mirror of
https://github.com/denoland/deno.git
synced 2024-11-26 16:09:27 -05:00
refactor: use Deno.execPath where possible (denoland/deno_std#548)
Original: 287b0a9cd2
This commit is contained in:
parent
44efefbda6
commit
b76007d25c
5 changed files with 11 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -11,7 +11,7 @@ let fileServer: Deno.Process;
|
|||
async function startFileServer(): Promise<void> {
|
||||
fileServer = run({
|
||||
args: [
|
||||
"deno",
|
||||
Deno.execPath,
|
||||
"run",
|
||||
"--allow-read",
|
||||
"--allow-net",
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
});
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue