From 25ff5cc0ad1281ad419e9f79824dd297672f4895 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Wed, 8 Mar 2023 15:00:44 -0700 Subject: [PATCH] update the cargo-cp-artifact to make windows nice (#972) update the cargo-cp-artifact to make windows nice Spawn has slightly different behavior on windows causing the cp command to fail when passing it additional arguments such as `-- type output.txt` (similar to `cat`). This additive change ensures that we are spawning a shell when appropriate on a windows platform. Tested cross platform. --------- Co-authored-by: K.J. Valencik --- pkgs/cargo-cp-artifact/src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/cargo-cp-artifact/src/index.js b/pkgs/cargo-cp-artifact/src/index.js index 9eda8eeb4..2ae2c876c 100644 --- a/pkgs/cargo-cp-artifact/src/index.js +++ b/pkgs/cargo-cp-artifact/src/index.js @@ -15,6 +15,7 @@ function run(argv, env) { const cp = spawn(options.cmd, options.args, { stdio: ["inherit", "pipe", "inherit"], + shell: process.platform === "win32", }); const rl = readline.createInterface({ input: cp.stdout });