mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Merge 1a2c45cba8 into b867ec9145
This commit is contained in:
commit
961d84124e
3 changed files with 7 additions and 6 deletions
|
|
@ -97,8 +97,8 @@ export class TerminalProcess extends BaseTerminalProcess {
|
|||
|
||||
// Execute command
|
||||
const defaultWindowsShellProfile = vscode.workspace
|
||||
.getConfiguration("terminal.integrated.defaultProfile")
|
||||
.get("windows")
|
||||
.getConfiguration("terminal.integrated")
|
||||
.get<string>("defaultProfile.windows")
|
||||
|
||||
const isPowerShell =
|
||||
process.platform === "win32" &&
|
||||
|
|
|
|||
|
|
@ -139,11 +139,11 @@ describe("Shell Detection Tests", () => {
|
|||
expect(getShell()).toBe("C:\\Program Files\\PowerShell\\7\\pwsh.exe")
|
||||
})
|
||||
|
||||
it("falls back to legacy PowerShell if profile includes 'powershell' but no path/source", () => {
|
||||
it("falls back to PowerShell 7 if profile includes 'powershell' but no path/source", () => {
|
||||
mockVsCodeConfig("windows", "PowerShell", {
|
||||
PowerShell: {},
|
||||
})
|
||||
expect(getShell()).toBe("C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe")
|
||||
expect(getShell()).toBe("C:\\Program Files\\PowerShell\\7\\pwsh.exe")
|
||||
})
|
||||
|
||||
it("uses WSL bash when profile indicates WSL source", () => {
|
||||
|
|
|
|||
|
|
@ -205,8 +205,9 @@ function getWindowsShellFromVSCode(): string | null {
|
|||
// If the profile is sourced from PowerShell, assume the newest
|
||||
return SHELL_PATHS.POWERSHELL_7
|
||||
}
|
||||
// Otherwise, assume legacy Windows PowerShell
|
||||
return SHELL_PATHS.POWERSHELL_LEGACY
|
||||
// Otherwise, default to PowerShell 7 (modern) since VS Code auto-discovers
|
||||
// PS7 profiles without setting an explicit path or source property
|
||||
return SHELL_PATHS.POWERSHELL_7
|
||||
}
|
||||
|
||||
// If there's a specific path, return that immediately
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue