diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-08-12 19:20:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 14:20:34 -0400 |
commit | 18ec1290afcd78c61933ecb52e3ad97cf644f0d5 (patch) | |
tree | 10705623951571e5ef73febdcee76e4def280ce7 /cli/rt | |
parent | 452693256ce7b607fa0b9454b22c57748f616742 (diff) |
feat: Support file URLs in Deno.run for executable (#6994)
Diffstat (limited to 'cli/rt')
-rw-r--r-- | cli/rt/40_process.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/rt/40_process.js b/cli/rt/40_process.js index 97744a600..0e81b8b0f 100644 --- a/cli/rt/40_process.js +++ b/cli/rt/40_process.js @@ -5,7 +5,7 @@ const { close } = window.__bootstrap.resources; const { readAll } = window.__bootstrap.buffer; const { sendSync, sendAsync } = window.__bootstrap.dispatchJson; - const { assert } = window.__bootstrap.util; + const { assert, pathFromURL } = window.__bootstrap.util; function opKill(pid, signo) { sendSync("op_kill", { pid, signo }); @@ -98,6 +98,9 @@ stderr = "inherit", stdin = "inherit", }) { + if (cmd[0] != null) { + cmd[0] = pathFromURL(cmd[0]); + } const res = opRun({ cmd: cmd.map(String), cwd, |