We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3cd886 commit 0ff1e48Copy full SHA for 0ff1e48
2 files changed
packages/@ionic/cli-utils/src/lib/serve.ts
@@ -540,7 +540,10 @@ export abstract class ServeCLI<T extends ServeCLIOptions> extends EventEmitter {
540
541
onBeforeExit(async () => {
542
p.removeListener('close', closeHandler);
543
- await killProcessTree(p.pid);
+
544
+ if (p.pid) {
545
+ await killProcessTree(p.pid);
546
+ }
547
});
548
549
const ws = this.createLoggerStream();
packages/@ionic/cli-utils/src/lib/shell.ts
@@ -69,7 +69,11 @@ export class Shell implements IShell {
69
}
70
71
if (killOnExit) {
72
- onBeforeExit(async () => killProcessTree(promise.p.pid));
+ onBeforeExit(async () => {
73
+ if (promise.p.pid) {
74
+ await killProcessTree(promise.p.pid);
75
76
+ });
77
78
79
await promise;
0 commit comments