Skip to content

Commit 2769119

Browse files
committed
fix(mcp): Return error for not-found processes in bulk termination
Align terminateTrackedProcess with sibling cleanup helpers by returning an error string when a PID is missing from the map, so stopAllTrackedProcesses reports accurate shutdown metrics.
1 parent 8290db2 commit 2769119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp/tools/swift-package/active-processes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export async function terminateTrackedProcess(
106106
}> {
107107
const info = activeProcesses.get(pid);
108108
if (!info) {
109-
return { status: 'not-found' };
109+
return { status: 'not-found', error: `Process not found: ${pid}` };
110110
}
111111

112112
activeProcesses.delete(pid);

0 commit comments

Comments
 (0)