mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 07:09:06 +08:00
[bootstrap] Use "unknownhash" if git is not available. Resolves #305
This commit is contained in:
parent
891fe4434c
commit
a65f4c3c0b
@ -7,9 +7,12 @@ param(
|
||||
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root
|
||||
|
||||
$gitHash = git rev-parse HEAD
|
||||
$gitHash = "unknownhash"
|
||||
if (Get-Command "git.exe" -ErrorAction SilentlyContinue)
|
||||
{
|
||||
$gitHash = git rev-parse HEAD
|
||||
}
|
||||
Write-Verbose("Git hash is " + $gitHash)
|
||||
$gitStartOfHash = $gitHash.substring(0,6)
|
||||
$vcpkgSourcesPath = "$vcpkgRootDir\toolsrc"
|
||||
Write-Verbose("vcpkg Path " + $vcpkgSourcesPath)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user