Skip to content

Commit a437dfe

Browse files
[ignore] package lock merge conflict
1 parent dfd5d19 commit a437dfe

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/process.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@ export class PowerShellProcess {
6969
powerShellArgs.push("-ExecutionPolicy", "Bypass");
7070
}
7171

72+
const stringToEncode = "& '" +
73+
PowerShellProcess.escapeSingleQuotes(startScriptPath) +
74+
"' " + this.startArgs;
75+
76+
// Use -EncodedCommand because the command is complex and has quotes in it that need to work xplat.
7277
powerShellArgs.push(
73-
"-Command",
74-
"& '" + PowerShellProcess.escapeSingleQuotes(startScriptPath) + "' " + this.startArgs);
78+
"-EncodedCommand",
79+
Buffer.from(stringToEncode, "utf16le").toString("base64"));
7580

7681
let powerShellExePath = this.exePath;
7782

0 commit comments

Comments
 (0)