Skip to content

Commit 19658a3

Browse files
committed
Fixes #2271 quotes terminal commands w/ spaces
1 parent 3b6f78e commit 19658a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/terminal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ function ensureTerminal(): Terminal {
2727
export function runGitCommandInTerminal(command: string, args: string, cwd: string, execute: boolean = false) {
2828
const terminal = ensureTerminal();
2929
terminal.show(false);
30-
terminal.sendText(`git -C ${cwd} ${command} ${args}`, execute);
30+
terminal.sendText(`git -C ${cwd.includes(' ') ? `"${cwd}"` : cwd} ${command} ${args}`, execute);
3131
}

0 commit comments

Comments
 (0)