Skip to content

Commit 246a044

Browse files
committed
Prefer the expected path over any old git-bash on Windows
In some environments (e.g. if you're building Chromium from scratch) you might have a totally unrelated git-bash command in your $PATH. That breaks terminal interception: with this if git-bash is installed in the normal way then it'll work regardless.
1 parent 6c6249a commit 246a044

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/interceptors/terminal/fresh-terminal-interceptor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ const getTerminalCommand = _.memoize(async (): Promise<SpawnArgs | null> => {
3939
});
4040

4141
const getWindowsTerminalCommand = async (): Promise<SpawnArgs | null> => {
42-
if (await commandExists('git-bash')) {
43-
return { command: 'git-bash' };
44-
} else if (await canAccess(DEFAULT_GIT_BASH_PATH)) {
42+
if (await canAccess(DEFAULT_GIT_BASH_PATH)) {
4543
return { command: DEFAULT_GIT_BASH_PATH };
44+
} else if (await commandExists('git-bash')) {
45+
return { command: 'git-bash' };
4646
}
4747

4848
return { command: 'start', args: ['cmd'], options: { shell: true }, skipStartupScripts: true };

0 commit comments

Comments
 (0)