We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dfd5d19 commit a437dfeCopy full SHA for a437dfe
src/process.ts
@@ -69,9 +69,14 @@ export class PowerShellProcess {
69
powerShellArgs.push("-ExecutionPolicy", "Bypass");
70
}
71
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.
77
powerShellArgs.push(
- "-Command",
- "& '" + PowerShellProcess.escapeSingleQuotes(startScriptPath) + "' " + this.startArgs);
78
+ "-EncodedCommand",
79
+ Buffer.from(stringToEncode, "utf16le").toString("base64"));
80
81
let powerShellExePath = this.exePath;
82
0 commit comments