Skip to content

Commit 76716f8

Browse files
committed
Get version for status icon when PowerShell fails to start
Grab it off the executable details since it won't be coming from the LSP request.
1 parent 377fdfb commit 76716f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/session.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,9 @@ Type 'help' to get help.
757757
const semver = new SemVer(this.versionDetails.version);
758758
this.languageStatusItem.text = `$(terminal-powershell) ${semver.major}.${semver.minor}`;
759759
this.languageStatusItem.detail += ` ${this.versionDetails.commit} (${this.versionDetails.architecture.toLowerCase()})`;
760+
} else if (this.PowerShellExeDetails?.displayName) { // In case it didn't start.
761+
this.languageStatusItem.text = `$(terminal-powershell) ${this.PowerShellExeDetails.displayName}`;
762+
this.languageStatusItem.detail += `: ${this.PowerShellExeDetails.exePath}`;
760763
}
761764

762765
if (statusText) {

0 commit comments

Comments
 (0)