MCPcopy Create free account
hub / github.com/codeHappyDananx/SpecWave / normalizeShell

Function normalizeShell

electron/main.js:1134–1149  ·  view source on GitHub ↗
(shell)

Source from the content-addressed store, hash-verified

1132}
1133
1134function normalizeShell(shell) {
1135 if (!shell) return DEFAULT_SHELL
1136 const value = String(shell).toLowerCase()
1137
1138 if (IS_WINDOWS) {
1139 if (value === 'cmd' || value === 'cmd.exe') return CMD_SHELL
1140 if (value === 'powershell' || value === 'powershell.exe') return DEFAULT_SHELL
1141 return DEFAULT_SHELL
1142 }
1143
1144 if (value === 'zsh') return '/bin/zsh'
1145 if (value === 'bash') return '/bin/bash'
1146 if (value === 'sh') return '/bin/sh'
1147
1148 return shell
1149}
1150
1151function resolveShellArgs(shell) {
1152 const value = String(shell || '').toLowerCase()

Callers 1

startTerminalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected