Skip to content

Commit

Permalink
refactor: use explicit coercion of exitCode to number.
Browse files Browse the repository at this point in the history
Implicit coercion to number was removed in node 20, see https://nodejs.org/api/deprecations.html#DEP0164

(cherry picked from commit be46c5f)
  • Loading branch information
JeanMeche authored and alan-agius4 committed Jul 8, 2024
1 parent 83b75af commit 4c6c32c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/devkit-admin.mts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ console.error = function (...args) {
try {
const script = await import(`./${scriptName}.mjs`);
const exitCode = await script.default(args, cwd);
process.exitCode = exitCode || 0;
process.exitCode = typeof exitCode === 'number' ? exitCode : 0;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (err: any) {
console.error(err.stack);
Expand Down

0 comments on commit 4c6c32c

Please sign in to comment.