From 18ec1290afcd78c61933ecb52e3ad97cf644f0d5 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Wed, 12 Aug 2020 19:20:34 +0100 Subject: feat: Support file URLs in Deno.run for executable (#6994) --- cli/rt/40_process.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cli/rt') 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, -- cgit v1.2.3