Skip to content

Commit

Permalink
Fix Deno compatibility issues on Windows (#6850)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Kocharin <alex@kocharin.ru>
  • Loading branch information
rlidwka authored and cknitt committed Jul 26, 2024
1 parent 93e16f6 commit bbada2d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions rescript
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,15 @@ process.on("uncaughtException", onUncaughtException);
// Ctrl+C
process.on("SIGINT", exitProcess);
// kill pid
process.on("SIGUSR1", exitProcess);
process.on("SIGUSR2", exitProcess);
process.on("SIGTERM", exitProcess);
process.on("SIGHUP", exitProcess);
try {
process.on("SIGUSR1", exitProcess);
process.on("SIGUSR2", exitProcess);
process.on("SIGTERM", exitProcess);
process.on("SIGHUP", exitProcess);
} catch (_e) {
// Deno might throw an error here, see https://github.com/denoland/deno/issues/9995
// TypeError: Windows only supports ctrl-c (SIGINT) and ctrl-break (SIGBREAK).
}

const process_argv = process.argv;
const maybeSubcommand = process_argv[2];
Expand Down

0 comments on commit bbada2d

Please sign in to comment.