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 Jul 4, 2024
1 parent f2e240b commit 5d1e25f
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 @@ -61,10 +61,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 args = process.argv.slice(2);
const argPatterns = {
Expand Down

0 comments on commit 5d1e25f

Please sign in to comment.