feat(coding-agent): expand ~ in shellPath setting (#6470)
getShellPath() now runs the configured shellPath through the existing normalizePath() helper, mirroring getSessionDir(). This lets shellPath point at a home-directory-relative shell wrapper (e.g. ~/.local/bin/agent-shell-sandbox) and resolves consistently across machines and OSes with different home directories. refs #6458
This commit is contained in:
committed by
GitHub
parent
3664806f2f
commit
1a2542b11b
@@ -95,7 +95,7 @@ export interface Settings {
|
||||
hideThinkingBlock?: boolean;
|
||||
showCacheMissNotices?: boolean; // default: false - show transcript notices for significant prompt-cache misses
|
||||
externalEditor?: string; // Command for Ctrl+G external editor; takes precedence over VISUAL/EDITOR
|
||||
shellPath?: string; // Custom shell path (e.g., for Cygwin users on Windows)
|
||||
shellPath?: string; // Custom shell path (e.g., for Cygwin users on Windows); supports leading ~ expansion
|
||||
quietStartup?: boolean;
|
||||
defaultProjectTrust?: DefaultProjectTrust; // default: "ask"; global setting only
|
||||
shellCommandPrefix?: string; // Prefix prepended to every bash command (e.g., "shopt -s expand_aliases" for alias support)
|
||||
@@ -876,7 +876,8 @@ export class SettingsManager {
|
||||
}
|
||||
|
||||
getShellPath(): string | undefined {
|
||||
return this.settings.shellPath;
|
||||
const shellPath = this.settings.shellPath;
|
||||
return shellPath ? normalizePath(shellPath) : shellPath;
|
||||
}
|
||||
|
||||
setShellPath(path: string | undefined): void {
|
||||
|
||||
Reference in New Issue
Block a user