1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-13 02:52:54 -05:00
denoland-deno/cli/tests/testdata/set_exit_code_0.ts
Ben Noordhuis 993a1dd41a
feat(runtime): add op_set_exit_code (#12911)
Set the exit code to use if none is provided to Deno.exit(), or when
Deno exits naturally.

Needed for process.exitCode Node compat. Paves the way for #12888.
2021-11-28 00:45:38 +01:00

2 lines
77 B
TypeScript

Deno.core.opSync("op_set_exit_code", 42);
Deno.exit(0); // Takes precedence.