diff options
Diffstat (limited to 'runtime/js/40_process.js')
-rw-r--r-- | runtime/js/40_process.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index 91e37701a..70a590f36 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -6,6 +6,13 @@ const { File } = window.__bootstrap.files; const { readAll } = window.__bootstrap.io; const { assert, pathFromURL } = window.__bootstrap.util; + const { + ArrayPrototypeMap, + TypeError, + isNaN, + ObjectEntries, + String, + } = window.__bootstrap.primordials; function opKill(pid, signo) { core.opSync("op_kill", { pid, signo }); @@ -102,9 +109,9 @@ cmd[0] = pathFromURL(cmd[0]); } const res = opRun({ - cmd: cmd.map(String), + cmd: ArrayPrototypeMap(cmd, String), cwd, - env: Object.entries(env), + env: ObjectEntries(env), stdin: isRid(stdin) ? "" : stdin, stdout: isRid(stdout) ? "" : stdout, stderr: isRid(stderr) ? "" : stderr, |