Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Looks correct; I found nothing blocking. It only runs on Windows, so I reviewed it by reading the code. I couldn't run it here (Linux runner).
pwshis only preferred when the app name is exactlypowershell, and whenwhere pwshfinds nothing the lookup falls back topowershellas before.- The widened check in
openPathkeepspwsh.exeon thecmd /c start … -NoExitpath, so it doesn't fall back intoexecFile(application, [target])(the problem #55710 fixed for Windows PowerShell). tsc -binpackages/desktoppasses, and the desktop file and platform tests pass.
Public API: unchanged. The menu entry id, its label and the stored preference are the same.
joe-ieta
pushed a commit
to joe-ieta/OpenCode.My
that referenced
this pull request
Nov 19, 2026
…nomalyco#64873) (cherry picked from commit 09cc0c7)
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #62087
Type of change
What does this PR do?
On Windows, Open in → PowerShell always launched Windows PowerShell 5.1, even when PowerShell 7 is installed.
The renderer resolves the entry's
openWith(powershell) throughresolveAppPath, which runswhere powershelland always findspowershell.exe. Now, for the PowerShell entry,resolveAppPathtriespwshfirst and falls back topowershellwhenwhere pwshfinds nothing. That matches what Windows Terminal does.openPathin main only sentpowershell.exethrough thecmd /c start … -NoExitpath, which opens a console window in the project folder. The check now matchespwsh(.exe)too. Without that,pwsh.exewould have gone throughexecFile(application, [target]), the same bug #55710 fixed for Windows PowerShell.The menu entry, its label and the stored preference stay the same. No flag: this is a bug fix.
How did you verify your code works?
On Windows 11 with PowerShell 7 installed:
resolveAppPathunder Bun.resolveAppPath("powershell")returnedC:\Program Files\PowerShell\7\pwsh.exe. With the PowerShell 7 and WindowsApps folders taken offPATH, it returnedC:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe.bun run dev) and picked Open in PowerShell from a local session's path menu. A new console opened, and the process was"C:\Program Files\PowerShell\7\pwsh.exe" -NoExit.bun typecheckinpackages/desktoppasses, and oxlint is clean on the touched files.Screenshots / recordings
Not a visual change.
Checklist