@yeaft/webchat-agent 0.1.218 → 0.1.219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/connection/upgrade.js +3 -2
- package/package.json +1 -1
package/connection/upgrade.js
CHANGED
|
@@ -14,8 +14,9 @@ const PM2_APP_NAME = 'yeaft-agent';
|
|
|
14
14
|
// In launchd/systemd environments, PATH may not include nvm/node dirs,
|
|
15
15
|
// but process.execPath always points to the running node binary.
|
|
16
16
|
const nodeBinDir = dirname(process.execPath);
|
|
17
|
-
const
|
|
18
|
-
const
|
|
17
|
+
const isWin = platform() === 'win32';
|
|
18
|
+
const npmPath = join(nodeBinDir, isWin ? 'npm.cmd' : 'npm');
|
|
19
|
+
const pm2Path = join(nodeBinDir, isWin ? 'pm2.cmd' : 'pm2');
|
|
19
20
|
|
|
20
21
|
// Shared cleanup logic for restart/upgrade
|
|
21
22
|
function cleanupAndExit(exitCode) {
|