diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2022-10-17 19:51:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-17 19:51:25 +0900 |
commit | e41af14b2a5e7643e4d4e882b20a828ef0104757 (patch) | |
tree | 272f45e879ea16217fea30842b22a0f7ba3a067d /runtime/js/40_spawn.js | |
parent | 0dc2f02dfa2b299cd8a8d352c880b05be463cf0f (diff) |
feat(unstable): add windowsRawArguments to SpawnOptions (#16319)
This change adds `windowsRawArguments` to `SpawnOptions`. The option enables
skipping the default quoting and escaping while creating the command on
windows.
The option works in a similar way as `windowsVerbatimArguments` in
child_process.spawn options in Node.js, and is necessary for simulating
it in `std/node`.
closes #8852
Diffstat (limited to 'runtime/js/40_spawn.js')
-rw-r--r-- | runtime/js/40_spawn.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/js/40_spawn.js b/runtime/js/40_spawn.js index a0283f0ff..a9a968ba3 100644 --- a/runtime/js/40_spawn.js +++ b/runtime/js/40_spawn.js @@ -36,6 +36,7 @@ stdout = "piped", stderr = "piped", signal = undefined, + windowsRawArguments = false, } = {}) { const child = ops.op_spawn_child({ cmd: pathFromURL(command), @@ -48,6 +49,7 @@ stdin, stdout, stderr, + windowsRawArguments, }, apiName); return new Child(illegalConstructorKey, { ...child, @@ -243,6 +245,7 @@ stdin = "null", stdout = "piped", stderr = "piped", + windowsRawArguments = false, } = {}) { if (stdin === "piped") { throw new TypeError( @@ -260,6 +263,7 @@ stdin, stdout, stderr, + windowsRawArguments, }); return { success: result.status.success, |