[vcpkg integrate] Exit silently if target cannot be found.

This commit is contained in:
Robert Schumacher 2017-01-24 15:17:45 -08:00
parent d98d7b386d
commit 33ce94a456

View File

@ -2,7 +2,14 @@
param([string]$targetBinary, [string]$installedDir, [string]$tlogFile)
function resolve($targetBinary) {
$targetBinaryPath = Resolve-Path $targetBinary
try
{
$targetBinaryPath = Resolve-Path $targetBinary -erroraction stop
}
catch [System.Management.Automation.ItemNotFoundException]
{
return
}
$targetBinaryDir = Split-Path $targetBinaryPath -parent
$a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" })