1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-29 16:30:56 -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. */ /** A more complicated test that runs a subprocess. */
test(async function catSmoke(): Promise<void> { test(async function catSmoke(): Promise<void> {
const p = run({ 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" stdout: "piped"
}); });
const s = await p.status(); const s = await p.status();

View file

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

View file

@ -8,7 +8,7 @@ import { TextProtoReader } from "../textproto/mod.ts";
let server: Deno.Process; let server: Deno.Process;
async function startServer(): Promise<void> { async function startServer(): Promise<void> {
server = run({ server = run({
args: ["deno", "run", "-A", "http/racing_server.ts"], args: [Deno.execPath, "run", "-A", "http/racing_server.ts"],
stdout: "piped" stdout: "piped"
}); });
// Once racing server is ready it will write to its stdout. // 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 // ensure script that is being installed exists
const ps = run({ const ps = run({
args: ["deno", "fetch", "--reload", moduleUrl], args: [Deno.execPath, "fetch", "--reload", moduleUrl],
stdout: "inherit", stdout: "inherit",
stderr: "inherit" stderr: "inherit"
}); });

View file

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