喵喵更新自动重启功能适配node app的启动方式

This commit is contained in:
Sirly 2022-06-16 04:38:58 +00:00 committed by GitHub
parent 7a86df5094
commit 802125727c

View File

@ -181,7 +181,7 @@ export async function updateMiaoPlugin(e) {
}), { EX: 30 }); }), { EX: 30 });
timer = setTimeout(function () { timer = setTimeout(function () {
let command = `npm run start`; let command = `npm run start`;
if(process.argv[1].includes("pm2")){ if (process.argv[1].includes("pm2")) {
command = `npm run restart`; command = `npm run restart`;
} }
exec(command, function (error, stdout, stderr) { exec(command, function (error, stdout, stderr) {