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:
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. */
|
/** 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();
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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"
|
||||||
});
|
});
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Reference in a new issue