diff --git a/examples/test.ts b/examples/test.ts index 8158763be5a9..542a191bf861 100644 --- a/examples/test.ts +++ b/examples/test.ts @@ -15,7 +15,13 @@ test(function t2(): void { /** A more complicated test that runs a subprocess. */ test(async function catSmoke(): Promise { const p = run({ - args: ["deno", "run", "--allow-read", "examples/cat.ts", "README.md"], + args: [ + Deno.execPath, + "run", + "--allow-read", + "examples/cat.ts", + "README.md" + ], stdout: "piped" }); const s = await p.status(); diff --git a/http/file_server_test.ts b/http/file_server_test.ts index 52d6ec6885db..bac82e82548b 100644 --- a/http/file_server_test.ts +++ b/http/file_server_test.ts @@ -11,7 +11,7 @@ let fileServer: Deno.Process; async function startFileServer(): Promise { fileServer = run({ args: [ - "deno", + Deno.execPath, "run", "--allow-read", "--allow-net", diff --git a/http/racing_server_test.ts b/http/racing_server_test.ts index dc16a49e1a01..a34f915d5efd 100644 --- a/http/racing_server_test.ts +++ b/http/racing_server_test.ts @@ -8,7 +8,7 @@ import { TextProtoReader } from "../textproto/mod.ts"; let server: Deno.Process; async function startServer(): Promise { server = run({ - args: ["deno", "run", "-A", "http/racing_server.ts"], + args: [Deno.execPath, "run", "-A", "http/racing_server.ts"], stdout: "piped" }); // Once racing server is ready it will write to its stdout. diff --git a/installer/mod.ts b/installer/mod.ts index 927485342e38..c38f1dbd4099 100644 --- a/installer/mod.ts +++ b/installer/mod.ts @@ -227,7 +227,7 @@ export async function install( // ensure script that is being installed exists const ps = run({ - args: ["deno", "fetch", "--reload", moduleUrl], + args: [Deno.execPath, "fetch", "--reload", moduleUrl], stdout: "inherit", stderr: "inherit" }); diff --git a/installer/test.ts b/installer/test.ts index 02a1aade1ff5..2309be4437cd 100644 --- a/installer/test.ts +++ b/installer/test.ts @@ -16,7 +16,7 @@ const isWindows = Deno.platform.os === "win"; async function startFileServer(): Promise { fileServer = run({ args: [ - "deno", + Deno.execPath, "run", "--allow-read", "--allow-net",