File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -152,11 +152,7 @@ export async function InvokePowerShellUpdateCheck(
152
152
sessionManager . stop ( ) ;
153
153
154
154
// Invoke the MSI via cmd.
155
- const msi = spawn ( "cmd" , [ `/S /C ${ msiDownloadPath } ` ] , {
156
- detached : true ,
157
- cwd : os . homedir ( ) ,
158
- env : process . env ,
159
- } ) ;
155
+ const msi = spawn ( "msiexec" , [ "/i" , msiDownloadPath ] ) ;
160
156
161
157
msi . on ( "close" , ( code ) => {
162
158
// Now that the MSI is finished, start the Integrated Console session.
@@ -165,10 +161,9 @@ export async function InvokePowerShellUpdateCheck(
165
161
} ) ;
166
162
167
163
} else if ( isMacOS ) {
168
- let script = "brew cask upgrade powershell" ;
169
- if ( release . isPreview ) {
170
- script = "brew cask upgrade powershell-preview" ;
171
- }
164
+ const script = release . isPreview
165
+ ? "brew cask upgrade powershell-preview"
166
+ : "brew cask upgrade powershell" ;
172
167
173
168
await languageServerClient . sendRequest ( EvaluateRequestType , {
174
169
expression : script ,
You can’t perform that action at this time.
0 commit comments