Git - upgrade which dependency (#184607)

This commit is contained in:
Ladislau Szomoru
2023-06-08 17:28:14 +02:00
committed by GitHub
parent bc18e1b188
commit fbdddfde42
3 changed files with 13 additions and 13 deletions

View File

@@ -129,9 +129,9 @@ function findSystemGitWin32(base: string, onValidate: (path: string) => boolean)
return findSpecificGit(path.join(base, 'Git', 'cmd', 'git.exe'), onValidate);
}
function findGitWin32InPath(onValidate: (path: string) => boolean): Promise<IGit> {
const whichPromise = new Promise<string>((c, e) => which('git.exe', (err, path) => err ? e(err) : c(path)));
return whichPromise.then(path => findSpecificGit(path, onValidate));
async function findGitWin32InPath(onValidate: (path: string) => boolean): Promise<IGit> {
const path = await which('git.exe');
return findSpecificGit(path, onValidate);
}
function findGitWin32(onValidate: (path: string) => boolean): Promise<IGit> {