| 109 | if (process.platform === 'darwin') { |
| 110 | const shell = process.env["SHELL"] ?? "/bin/zsh"; |
| 111 | const shellArgsMap = (shellType: string) => { |
| 112 | switch (shellType) { |
| 113 | case "fish": |
| 114 | // We special case fish here because fish's `fish_add_path` function |
| 115 | // tends to prepend to PATH by default, hence sourcing the fish config after |
| 116 | // vscode reopens in devbox environment, overwrites devbox packages and |
| 117 | // might cause confusion for users as to why their system installed packages |
| 118 | // show up when they type for example `which go` as opposed to the packages |
| 119 | // installed by devbox. |
| 120 | return ["--no-config"]; |
| 121 | default: |
| 122 | return []; |
| 123 | } |
| 124 | }; |
| 125 | const shellTypeSlices = shell.split("/"); |
| 126 | const shellType = shellTypeSlices[shellTypeSlices.length - 1]; |
| 127 | shellArgsMap(shellType); |