From fc18c50f591e80614d932f94687a713175bd763a Mon Sep 17 00:00:00 2001 From: suwings Date: Wed, 30 May 2018 13:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20-=20=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 15 ++++++++------- package.json | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index 1f4cfcd9..66faa9bf 100644 --- a/app.js +++ b/app.js @@ -9,6 +9,14 @@ try { //忽略任何版本检测导致的错误 } +setTimeout(() => { + let arg2 = process.argv[2] || ''; + if (arg2 == '--test') { + MCSERVER.infoLog("Test", "测试过程结束 | 退出..."); + process.exit(0); + } +}, 10000); + const fs = require('fs'); const fsex = require('fs-extra'); @@ -246,13 +254,6 @@ app.use('/fs', require('./onlinefs/controller/function')); if (MCSERVER.localProperty.ftp_is_allow) require('./ftpd/index'); //执行ftp逻辑 - setTimeout(() => { - let arg2 = process.argv[2]; - if (arg2 == '--debug') { - MCSERVER.infoLog("测试完毕 | 退出..."); - process.exit(0); - } - }, 10000); }); diff --git a/package.json b/package.json index 4bc7a11c..f808c8ba 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ }, "scripts": { "start": "node app.js", - "test": "node app.js" + "test": "node app.js --test" }, "engines": { "node": ">=8.0"