diff --git a/extensions/git/package.json b/extensions/git/package.json index 5e00d215463..1ac07ba7120 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -2936,14 +2936,14 @@ "jschardet": "3.0.0", "picomatch": "2.3.1", "vscode-uri": "^2.0.0", - "which": "^1.3.0" + "which": "3.0.1" }, "devDependencies": { "@types/byline": "4.2.31", "@types/mocha": "^9.1.1", "@types/node": "16.x", "@types/picomatch": "2.3.0", - "@types/which": "^1.0.28" + "@types/which": "3.0.0" }, "repository": { "type": "git", diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 8666cfd4ab8..f0e778ba9bc 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -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 { - const whichPromise = new Promise((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 { + const path = await which('git.exe'); + return findSpecificGit(path, onValidate); } function findGitWin32(onValidate: (path: string) => boolean): Promise { diff --git a/extensions/git/yarn.lock b/extensions/git/yarn.lock index fac7f29a878..b11a72fd3c2 100644 --- a/extensions/git/yarn.lock +++ b/extensions/git/yarn.lock @@ -202,10 +202,10 @@ resolved "https://registry.yarnpkg.com/@types/picomatch/-/picomatch-2.3.0.tgz#75db5e75a713c5a83d5b76780c3da84a82806003" integrity sha512-O397rnSS9iQI4OirieAtsDqvCj4+3eY1J+EPdNTKuHuRWIfUoGyzX294o8C4KJYaLqgSrd2o60c5EqCU8Zv02g== -"@types/which@^1.0.28": - version "1.0.28" - resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6" - integrity sha1-AW44dim4gXvtZT/jLqtdESecjfY= +"@types/which@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/which/-/which-3.0.0.tgz#849afdd9fdcb0b67339b9cfc80fa6ea4e0253fc5" + integrity sha512-ASCxdbsrwNfSMXALlC3Decif9rwDMu+80KGp5zI2RLRotfMsTv7fHL8W8VDp24wymzDyIFudhUeSCugrgRFfHQ== "@vscode/extension-telemetry@0.7.5": version "0.7.5" @@ -487,9 +487,9 @@ vscode-uri@^2.0.0: resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.0.0.tgz#2df704222f72b8a71ff266ba0830ed6c51ac1542" integrity sha512-lWXWofDSYD8r/TIyu64MdwB4FaSirQ608PP/TzUyslyOeHGwQ0eTHUZeJrK1ILOmwUHaJtV693m2JoUYroUDpw== -which@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - integrity sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg== +which@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/which/-/which-3.0.1.tgz#89f1cd0c23f629a8105ffe69b8172791c87b4be1" + integrity sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg== dependencies: isexe "^2.0.0"