Skip to content

Commit 84b0921

Browse files
gnoviawanclaude
andcommitted
fix: store shell path instead of name in defaultShell settings
The defaultShell setting was storing shell.name (e.g., "pwsh") instead of shell.path (e.g., "C:\Program Files\PowerShell\7\pwsh.exe"). This caused the backend to fail PATH resolution and fall back to the wrong shell (Windows PowerShell 5 instead of PowerShell 7). Changes: - AppPreferences.tsx: Use shell.path as option value - ProjectSidebar.tsx: Use shell.path for project default shell - Display shell.displayName for cleaner UI Fixes #59 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5ccf1f2 commit 84b0921

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/renderer/components/ProjectSidebar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ export function ProjectSidebar({
215215
const project = projects.find((p) => p.id === projectId)
216216
const shellSubmenu: ContextMenuSubItem[] = availableShells?.available.map((shell) => ({
217217
label: shell.displayName,
218-
value: shell.name,
219-
isSelected: project?.defaultShell === shell.name
218+
value: shell.path,
219+
isSelected: project?.defaultShell === shell.path
220220
})) || []
221221

222222
const items: ContextMenuItem[] = [
@@ -237,8 +237,8 @@ export function ProjectSidebar({
237237
label: 'Set Default Shell',
238238
icon: <Terminal size={14} />,
239239
submenu: shellSubmenu,
240-
onSubmenuSelect: (shellName: string) => {
241-
onUpdateProject(projectId, { defaultShell: shellName })
240+
onSubmenuSelect: (shellPath: string) => {
241+
onUpdateProject(projectId, { defaultShell: shellPath })
242242
}
243243
})
244244
}

src/renderer/pages/AppPreferences.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ export default function AppPreferences(): React.JSX.Element {
293293
>
294294
<option value="">System Default</option>
295295
{availableShells?.available?.map((shell) => (
296-
<option key={shell.path} value={shell.name}>
297-
{shell.name} ({shell.path})
296+
<option key={shell.path} value={shell.path}>
297+
{shell.displayName}
298298
</option>
299299
))}
300300
</select>

0 commit comments

Comments
 (0)