Skip to content

Commit c4075fa

Browse files
committed
Fix: Normalize executable path for Git Bash on Windows in runInTerminal function
1 parent bd2de07 commit c4075fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/features/terminal/runInTerminal.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { onDidEndTerminalShellExecution } from '../../common/window.apis';
55
import { ShellConstants } from '../common/shellConstants';
66
import { identifyTerminalShell } from '../common/shellDetector';
77
import { quoteArgs } from '../execution/execUtils';
8+
import { normalizeShellPath } from './shells/common/shellUtils';
89

910
export async function runInTerminal(
1011
environment: PythonEnvironment,
@@ -19,6 +20,11 @@ export async function runInTerminal(
1920
const args = environment.execInfo?.activatedRun?.args ?? environment.execInfo?.run.args ?? [];
2021
const allArgs = [...args, ...(options.args ?? [])];
2122
const shellType = identifyTerminalShell(terminal);
23+
24+
// Normalize executable path for Git Bash on Windows
25+
if (shellType === ShellConstants.GITBASH) {
26+
executable = normalizeShellPath(executable, shellType);
27+
}
2228
if (terminal.shellIntegration) {
2329
let execution: TerminalShellExecution | undefined;
2430
const deferred = createDeferred<void>();

0 commit comments

Comments
 (0)