mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
Honor user's configured default shell instead of hardcoding zsh (#151)
This commit is contained in:
@@ -174,7 +174,23 @@ const store = new Store<MaestroSettings>({
|
||||
fontFamily: 'Roboto Mono, Menlo, "Courier New", monospace',
|
||||
customFonts: [],
|
||||
logLevel: 'info',
|
||||
defaultShell: 'zsh',
|
||||
defaultShell: (() => {
|
||||
// Windows: $SHELL doesn't exist; default to PowerShell
|
||||
if (process.platform === 'win32') {
|
||||
return 'powershell';
|
||||
}
|
||||
// Unix: Respect user's configured login shell from $SHELL
|
||||
const shellPath = process.env.SHELL;
|
||||
if (shellPath) {
|
||||
const shellName = path.basename(shellPath);
|
||||
// Valid Unix shell IDs from shellDetector.ts (lines 27-34)
|
||||
if (['bash', 'zsh', 'fish', 'sh', 'tcsh'].includes(shellName)) {
|
||||
return shellName;
|
||||
}
|
||||
}
|
||||
// Fallback to bash (more portable than zsh on older Unix systems)
|
||||
return 'bash';
|
||||
})(),
|
||||
webAuthEnabled: false,
|
||||
webAuthToken: null,
|
||||
webInterfaceUseCustomPort: false,
|
||||
|
||||
Reference in New Issue
Block a user