Skip to content

Commit 080d4c3

Browse files
committed
feat(core/git): Add support for git.path when running Git commands (#36)
1 parent 0b40721 commit 080d4c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/git/exec-base.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ export const execBase = (
1717
token?: vscode.CancellationToken
1818
): Promise<ExecResult> => {
1919
return new Promise((resolve, reject) => {
20+
const gitPath = vscode.workspace.getConfiguration('git').get<string>('path', 'git');
2021
logger.log(`'Running in' ${cwd}`);
21-
logger.log(`> ${['git'].concat(args || []).join(' ')}`);
22+
logger.log(`> ${[gitPath].concat(args || []).join(' ')}`);
2223
const httpProxy = Config.get('httpProxy', '');
2324
let env = process.env;
2425
if (httpProxy) {
@@ -28,7 +29,7 @@ export const execBase = (
2829
});
2930
}
3031

31-
const proc = cp.spawn('git', args, {
32+
const proc = cp.spawn(gitPath, args, {
3233
cwd,
3334
env: {
3435
...env,

0 commit comments

Comments
 (0)