mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
fixes #34358
This commit is contained in:
@@ -143,16 +143,17 @@ function findGitWin32(): Promise<IGit> {
|
||||
export function findGit(hint: string | undefined): Promise<IGit> {
|
||||
var first = hint ? findSpecificGit(hint) : Promise.reject<IGit>(null);
|
||||
|
||||
return first.then(void 0, () => {
|
||||
switch (process.platform) {
|
||||
case 'darwin': return findGitDarwin();
|
||||
case 'win32': return findGitWin32();
|
||||
default: return findSpecificGit('git');
|
||||
}
|
||||
});
|
||||
return first
|
||||
.then(void 0, () => {
|
||||
switch (process.platform) {
|
||||
case 'darwin': return findGitDarwin();
|
||||
case 'win32': return findGitWin32();
|
||||
default: return findSpecificGit('git');
|
||||
}
|
||||
})
|
||||
.then(null, () => Promise.reject(new Error('Git installation not found.')));
|
||||
}
|
||||
|
||||
|
||||
export interface IExecutionResult {
|
||||
exitCode: number;
|
||||
stdout: string;
|
||||
|
||||
Reference in New Issue
Block a user