diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2019-09-07 01:57:15 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-09-06 12:57:15 -0400 |
commit | 595b4daa77771458457e178b6b590a044cd41ad0 (patch) | |
tree | d8b19636e4795bcb11ba5c45982d32334da60115 /js/process.ts | |
parent | ca000392857b4c79a3609ddbc20073222498998b (diff) |
Remove replacements hack in deno_typescript (#2864)
Diffstat (limited to 'js/process.ts')
-rw-r--r-- | js/process.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/js/process.ts b/js/process.ts index 4de9fe774..0c77929f9 100644 --- a/js/process.ts +++ b/js/process.ts @@ -5,7 +5,7 @@ import { File, close } from "./files.ts"; import { ReadCloser, WriteCloser } from "./io.ts"; import { readAll } from "./buffer.ts"; import { assert, unreachable } from "./util.ts"; -import { platform } from "./build.ts"; +import { build } from "./build.ts"; /** How to handle subprocess stdio. * @@ -296,4 +296,12 @@ enum MacOSSignal { /** Signals numbers. This is platform dependent. */ -export const Signal = platform.os === "mac" ? MacOSSignal : LinuxSignal; +export const Signal = {}; + +export function setSignals(): void { + if (build.os === "mac") { + Object.assign(Signal, MacOSSignal); + } else { + Object.assign(Signal, LinuxSignal); + } +} |