fix(cutover): parse detached child pid safely
This commit is contained in:
@@ -172,7 +172,7 @@ export const nodeCutoverSystem: CutoverSystem = {
|
|||||||
stdio: ['ignore', 'pipe', 'ignore'],
|
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');
|
if (!Number.isSafeInteger(pid) || pid <= 1) throw new Error('Failed to start command');
|
||||||
return pid;
|
return pid;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user