e2e-agent-runner 1.5.4 → 1.5.5
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/claude.mjs +1 -1
- package/package.json +1 -1
- package/runner.mjs +8 -4
package/claude.mjs
CHANGED
|
@@ -223,7 +223,7 @@ function killTree(child) {
|
|
|
223
223
|
const killGroup = (signal) => {
|
|
224
224
|
try {
|
|
225
225
|
if (process.platform === 'win32') {
|
|
226
|
-
if (child.pid) spawn('taskkill', ['/pid', String(child.pid), '/T', '/F']);
|
|
226
|
+
if (child.pid) spawn('taskkill', ['/pid', String(child.pid), '/T', '/F']).on('error', () => {});
|
|
227
227
|
} else if (child.pid) {
|
|
228
228
|
process.kill(-child.pid, signal); // detached 그룹 전체
|
|
229
229
|
}
|
package/package.json
CHANGED
package/runner.mjs
CHANGED
|
@@ -503,11 +503,15 @@ function runDeployCommand(project, cwd, cancelled) {
|
|
|
503
503
|
if (cancelled()) killGroup(child, 'SIGTERM');
|
|
504
504
|
}, 1000);
|
|
505
505
|
const killer = setTimeout(() => killGroup(child, 'SIGKILL'), DEPLOY_TIMEOUT_S * 1000);
|
|
506
|
-
|
|
506
|
+
const settle = (result) => {
|
|
507
507
|
clearInterval(cancelTimer);
|
|
508
508
|
clearTimeout(killer);
|
|
509
|
-
resolve(
|
|
510
|
-
}
|
|
509
|
+
resolve(result);
|
|
510
|
+
};
|
|
511
|
+
child.on('close', (code) => settle({ code, out }));
|
|
512
|
+
// spawn 실패(EMFILE·cwd 소멸 등)는 close 없이 error 만 발생 — 미처리 'error' 이벤트가
|
|
513
|
+
// 러너 데몬 전체를 죽이고 Promise 도 미해결(busy 고착)이게 한다. 실패로 수렴시킨다.
|
|
514
|
+
child.on('error', (e) => settle({ code: -1, out: `${out}\n[spawn 오류] ${e.message}`.trim() }));
|
|
511
515
|
});
|
|
512
516
|
}
|
|
513
517
|
|
|
@@ -518,7 +522,7 @@ function runDeployCommand(project, cwd, cancelled) {
|
|
|
518
522
|
function killGroup(child, signal) {
|
|
519
523
|
try {
|
|
520
524
|
if (process.platform === 'win32') {
|
|
521
|
-
if (child.pid) spawn('taskkill', ['/pid', String(child.pid), '/T', '/F']);
|
|
525
|
+
if (child.pid) spawn('taskkill', ['/pid', String(child.pid), '/T', '/F']).on('error', () => {});
|
|
522
526
|
} else if (child.pid) {
|
|
523
527
|
process.kill(-child.pid, signal);
|
|
524
528
|
}
|