File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -69,14 +69,20 @@ export class PowerShellProcess {
69
69
powerShellArgs . push ( "-ExecutionPolicy" , "Bypass" ) ;
70
70
}
71
71
72
- const stringToEncode = "& '" +
72
+ const startEditorServices = "& '" +
73
73
PowerShellProcess . escapeSingleQuotes ( startScriptPath ) +
74
74
"' " + this . startArgs ;
75
75
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
+ }
80
86
81
87
let powerShellExePath = this . exePath ;
82
88
You can’t perform that action at this time.
0 commit comments