Skip to content

Commit a8dd54b

Browse files
committed
fix(cli): ensure process exits in notifyUpdate catch blocks
Add process.exit(exitCode) in catch blocks to prevent process from hanging when errors occur during update notification check. This ensures the process always terminates with the appropriate exit code in all code paths.
1 parent 4c131bf commit a8dd54b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/create-turbo/src/utils/notifyUpdate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ export async function notifyUpdate(exitCode: number = 0): Promise<void> {
1919
}
2020
process.exit(exitCode);
2121
} catch (_) {
22-
// ignore error
22+
process.exit(exitCode);
2323
}
2424
}

packages/turbo-codemod/src/utils/notifyUpdate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ export async function notifyUpdate(exitCode: number = 0): Promise<void> {
3434
}
3535
process.exit(exitCode);
3636
} catch (_) {
37-
// ignore error
37+
process.exit(exitCode);
3838
}
3939
}

packages/turbo-gen/src/utils/notifyUpdate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export async function notifyUpdate(exitCode: number = 0): Promise<void> {
2121
}
2222
process.exit(exitCode);
2323
} catch (_) {
24-
// ignore error
24+
process.exit(exitCode);
2525
}
2626
}

0 commit comments

Comments
 (0)