Skip to content

Commit cb1cc61

Browse files
committed
fix(cli): use engineUrl for watchdog disconnect, exit on SIGINT
1 parent e94add9 commit cb1cc61

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/cli-v3/src/dev/devSupervisor.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ class DevSupervisor implements WorkerRuntime {
168168
);
169169

170170
await Promise.allSettled(stopPromises);
171+
172+
// Must exit explicitly since registering a custom SIGINT handler
173+
// overrides Node's default process termination behavior.
174+
process.exit(0);
171175
};
172176

173177
async shutdown(): Promise<void> {
@@ -224,7 +228,7 @@ class DevSupervisor implements WorkerRuntime {
224228
env: {
225229
...process.env,
226230
WATCHDOG_PARENT_PID: process.pid.toString(),
227-
WATCHDOG_API_URL: this.options.client.apiURL,
231+
WATCHDOG_API_URL: this.config?.engineUrl ?? this.options.client.apiURL,
228232
WATCHDOG_API_KEY: this.options.client.accessToken ?? "",
229233
WATCHDOG_ACTIVE_RUNS: this.activeRunsPath,
230234
WATCHDOG_PID_FILE: this.watchdogPidPath,

0 commit comments

Comments
 (0)