diff options
Diffstat (limited to 'runtime/js/40_spawn.js')
-rw-r--r-- | runtime/js/40_spawn.js | 9 |
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({ |