fix(cutover): parse detached child pid safely

This commit is contained in:
chick
2026-07-18 17:56:03 +08:00
parent e4e2c32998
commit f326da705c
+1 -1
View File
@@ -172,7 +172,7 @@ export const nodeCutoverSystem: CutoverSystem = {
stdio: ['ignore', 'pipe', 'ignore'],
},
);
const pid = Number(output.trim());
const pid = Number(output.trim().split(/\s+/u)[0]);
if (!Number.isSafeInteger(pid) || pid <= 1) throw new Error('Failed to start command');
return pid;
},