Skip to content

Commit

Permalink
tools enhanced Get-VcpkgHash
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Dec 22, 2023
1 parent 4e305eb commit 37ad4a6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tools/Get-VcpkgHash.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ Param(

Set-StrictMode -Version 3.0

. $PSScriptRoot\private\Common-Host.ps1

# Get a git object by the current parameter set
# The vcpkg uses the archive/ prefix only without the refs/heads/ or refs/tags/:
# https://github.com/microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_github.cmake#L107
Expand Down Expand Up @@ -96,8 +94,9 @@ try {
vcpkg hash $tempFile
}
catch {
# Exiting directly from the catch block is ok, the finally block will be invoked correctly
Write-ExitError "Failed to download the archive for hashing from the URL:`n$url"
Write-Error "Failed to download the archive for hashing from the URL:`n$url"
# Re-throw
throw
}
finally {
$ProgressPreference = $previousProgressPreference
Expand Down

0 comments on commit 37ad4a6

Please sign in to comment.