1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-28 10:09:20 -05:00

refactor: use Deno.execPath where possible (denoland/deno_std#548)

Original: 287b0a9cd2
This commit is contained in:
Yoshiya Hinosawa 2019-07-29 17:46:21 +09:00 committed by Ryan Dahl
parent 44efefbda6
commit b76007d25c
5 changed files with 11 additions and 5 deletions

View file

@ -15,7 +15,13 @@ test(function t2(): void {
/** A more complicated test that runs a subprocess. */
test(async function catSmoke(): Promise<void> {
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();

View file

@ -11,7 +11,7 @@ let fileServer: Deno.Process;
async function startFileServer(): Promise<void> {
fileServer = run({
args: [
"deno",
Deno.execPath,
"run",
"--allow-read",
"--allow-net",

View file

@ -8,7 +8,7 @@ import { TextProtoReader } from "../textproto/mod.ts";
let server: Deno.Process;
async function startServer(): Promise<void> {
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.

View file

@ -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"
});

View file

@ -16,7 +16,7 @@ const isWindows = Deno.platform.os === "win";
async function startFileServer(): Promise<void> {
fileServer = run({
args: [
"deno",
Deno.execPath,
"run",
"--allow-read",
"--allow-net",