You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidthis.setSessionFailedGetPowerShell(`PowerShell ${version} is not supported, please update!`);
469
+
}elseif(satisfies(version,">=5.1.0 <6.0.0")){
470
+
voidthis.setSessionFailedGetPowerShell("It looks like you're trying to use Windows PowerShell, which is supported on a best-effort basis. Can you try PowerShell 7?");
471
+
}elseif(satisfies(version,">=6.0.0 <7.2.0")){
472
+
voidthis.setSessionFailedGetPowerShell(`PowerShell ${version} has reached end-of-support, please update!`);
473
+
}else{
474
+
shouldUpdate=false;
475
+
voidthis.setSessionFailedOpenBug("PowerShell language server process didn't start!");
476
+
}
477
+
if(shouldUpdate){
478
+
// Run the update notifier since it won't run later as we failed
479
+
// to start, but we have enough details to do so now.
480
+
constversionDetails: IPowerShellVersionDetails={
481
+
"version": version,
482
+
"edition": "",// Unused by UpdatePowerShell
483
+
"commit": version,// Actually used by UpdatePowerShell
484
+
"architecture": process.arch// Best guess based off Code's architecture
"PowerShell language features are disabled due to an unsupported LanguageMode: "+
479
-
`${this.sessionDetails.detail}`);
504
+
this.setSessionFailure(`PowerShell language features are disabled due to an unsupported LanguageMode: ${this.sessionDetails.detail}`);
480
505
}else{
481
-
this.setSessionFailure(
482
-
`PowerShell could not be started for an unknown reason '${this.sessionDetails.reason}'`);
506
+
voidthis.setSessionFailedOpenBug(`PowerShell could not be started for an unknown reason: ${this.sessionDetails.reason}`);
483
507
}
484
508
}else{
485
-
this.setSessionFailure(
486
-
`Unknown session status '${this.sessionDetails?.status}' with reason '${this.sessionDetails?.reason}`);
509
+
voidthis.setSessionFailedOpenBug(`PowerShell could not be started with an unknown status: ${this.sessionDetails.status}, and reason: ${this.sessionDetails.reason}`);
0 commit comments