summaryrefslogtreecommitdiff
path: root/runtime/js/40_spawn.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-12-09 16:43:36 +0100
committerGitHub <noreply@github.com>2022-12-09 16:43:36 +0100
commitcb6700fa5aac03fb3e082f9ed2e01d74238e6a99 (patch)
treeda3edbc7b283deaeff970ba06e32c02bbfbfe010 /runtime/js/40_spawn.js
parent6541a0a9fd818424688003c617e4a84c3cf7d34d (diff)
unstable: remove Deno.spawn, Deno.spawnSync, Deno.spawnChild APIs (#16893)
This commit removes three unstable Deno APIs: - "Deno.spawn()" - "Deno.spawnSync()" - "Deno.spawnChild()" These APIs were replaced by a unified "Deno.Command" API.
Diffstat (limited to 'runtime/js/40_spawn.js')
-rw-r--r--runtime/js/40_spawn.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/js/40_spawn.js b/runtime/js/40_spawn.js
index 863063e3f..ea6b409a3 100644
--- a/runtime/js/40_spawn.js
+++ b/runtime/js/40_spawn.js
@@ -60,7 +60,7 @@
function createSpawnChild(opFn) {
return function spawnChild(command, options = {}) {
- return spawnChildInner(opFn, command, "Deno.spawnChild()", options);
+ return spawnChildInner(opFn, command, "Deno.Command().spawn()", options);
};
}
@@ -219,10 +219,11 @@
return function spawn(command, options) {
if (options?.stdin === "piped") {
throw new TypeError(
- "Piped stdin is not supported for this function, use 'Deno.spawnChild()' instead",
+ "Piped stdin is not supported for this function, use 'Deno.Command().spawn()' instead",
);
}
- return spawnChildInner(opFn, command, "Deno.spawn()", options).output();
+ return spawnChildInner(opFn, command, "Deno.Command().output()", options)
+ .output();
};
}
@@ -241,7 +242,7 @@
} = {}) {
if (stdin === "piped") {
throw new TypeError(
- "Piped stdin is not supported for this function, use 'Deno.spawnChild()' instead",
+ "Piped stdin is not supported for this function, use 'Deno.Command().spawn()' instead",
);
}
const result = opFn({