diff --git a/scripts/admin-upgrade-runner.mjs b/scripts/admin-upgrade-runner.mjs index be91453..75d226e 100755 --- a/scripts/admin-upgrade-runner.mjs +++ b/scripts/admin-upgrade-runner.mjs @@ -495,7 +495,7 @@ function detectRestartCommand() { label: '检测 PM2 进程', }); if (pm2Names.includes('"name":"miaojing-dev"')) return 'pm2 restart miaojing-dev --update-env'; - if (fs.existsSync(path.join(projectRoot, 'ecosystem.config.cjs'))) return 'pm2 startOrReload ecosystem.config.cjs --update-env'; + if (fs.existsSync(path.join(projectRoot, 'ecosystem.config.cjs'))) return 'pm2 startOrReload ecosystem.config.cjs --update-env && pm2 save'; return 'pm2 restart miaojing-dev --update-env'; }