[vcpkg] Don't use -ListImported in bootstrap. Fixes #1711

This commit is contained in:
Robert Schumacher 2017-08-28 17:33:03 -07:00
parent 4d952a5e1d
commit b21bc7c11a

View File

@ -14,7 +14,7 @@ $oldpath = $env:path
try try
{ {
$env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd" $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd"
if (Get-Command "git" -ListImported -ErrorAction SilentlyContinue) if (Get-Command "git" -ErrorAction SilentlyContinue)
{ {
$gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short
if ($LASTEXITCODE -ne 0) if ($LASTEXITCODE -ne 0)