From e41af14b2a5e7643e4d4e882b20a828ef0104757 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 17 Oct 2022 19:51:25 +0900 Subject: 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 --- runtime/js/40_spawn.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/js') 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, -- cgit v1.2.3