File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -69,14 +69,20 @@ export class PowerShellProcess {
6969 powerShellArgs . push ( "-ExecutionPolicy" , "Bypass" ) ;
7070 }
7171
72- const stringToEncode = "& '" +
72+ const startEditorServices = "& '" +
7373 PowerShellProcess . escapeSingleQuotes ( startScriptPath ) +
7474 "' " + this . startArgs ;
7575
76- // Use -EncodedCommand because the command is complex and has quotes in it that need to work xplat.
77- powerShellArgs . push (
78- "-EncodedCommand" ,
79- Buffer . from ( stringToEncode , "utf16le" ) . toString ( "base64" ) ) ;
76+ if ( utils . isWindowsOS ( ) ) {
77+ powerShellArgs . push (
78+ "-Command" ,
79+ startEditorServices ) ;
80+ } else {
81+ // Use -EncodedCommand for better quote support on non-Windows
82+ powerShellArgs . push (
83+ "-EncodedCommand" ,
84+ Buffer . from ( startEditorServices , "utf16le" ) . toString ( "base64" ) ) ;
85+ }
8086
8187 let powerShellExePath = this . exePath ;
8288
You can’t perform that action at this time.
0 commit comments