增加node app转为npm start时退出进程,防止进程互相干扰

This commit is contained in:
Sirly 2022-06-16 13:27:49 +08:00 committed by GitHub
parent a690aa72e8
commit 6519a1c024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,6 +189,10 @@ export async function updateMiaoPlugin(e) {
e.reply("自动重启失败,请手动重启以应用新版喵喵。\nError code: " + error.code + "\n" + error.stack + "\n");
Bot.logger.error('重启失败\n${error.stack}');
return true;
} else if (stdout) {
Bot.logger.mark("重启成功运行已转为后台查看日志请用命令npm run log");
Bot.logger.mark("停止后台运行命令npm stop");
process.exit();
}
})
}, 1000);
@ -257,4 +261,4 @@ export async function profileCfg(e, { render }) {
...cfg,
}, { e, render, scale: 1.4 });
}
}