mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Fix bug when shell profile is not found (#1671)
This commit is contained in:
parent
548338d39e
commit
10b8ee4f54
2 changed files with 6 additions and 1 deletions
|
|
@ -78,6 +78,11 @@ describe("Shell Detection Tests", () => {
|
|||
expect(getShell()).to.equal("C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe")
|
||||
})
|
||||
|
||||
it("handles undefined shell profile gracefully", () => {
|
||||
mockVsCodeConfig("windows", "NonExistentProfile", {})
|
||||
expect(getShell()).to.equal("C:\\Windows\\System32\\cmd.exe")
|
||||
})
|
||||
|
||||
it("uses WSL bash when profile indicates WSL source", () => {
|
||||
mockVsCodeConfig("windows", "WSL", {
|
||||
WSL: { source: "WSL" },
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ function getWindowsShellFromVSCode(): string | null {
|
|||
}
|
||||
|
||||
// If there's a specific path, return that immediately
|
||||
if (profile.path) {
|
||||
if (profile?.path) {
|
||||
return profile.path
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue