Skip to content

Commit be46c5f

Browse files
JeanMechealan-agius4
authored andcommitted
refactor: use explicit coercion of exitCode to number.
Implicit coercion to number was removed in node 20, see https://nodejs.org/api/deprecations.html#DEP0164
1 parent dfd5b43 commit be46c5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/devkit-admin.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ console.error = function (...args) {
3737
try {
3838
const script = await import(`./${scriptName}.mjs`);
3939
const exitCode = await script.default(args, cwd);
40-
process.exitCode = exitCode || 0;
40+
process.exitCode = typeof exitCode === 'number' ? exitCode : 0;
4141
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4242
} catch (err: any) {
4343
console.error(err.stack);

0 commit comments

Comments
 (0)