Created
November 1, 2015 00:05
-
-
Save marcduiker/345f5aa6e0e55accb81b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
This script returns the full path of the curl.exe. | |
#> | |
$curlExe = 'curl.exe' | |
$curlPath = Resolve-Path "$PSScriptRoot\..\tools\curl-7.33.0-win64-nossl\$curlExe" # This is the path on the local dev machine. | |
if (-not (Test-Path $curlPath)) | |
{ | |
# Fall-back to use curl.exe located in the same location as the script. | |
if (Test-Path "$PSScriptRoot\$curlExe") | |
{ | |
$curlPath = "$PSScriptRoot\$curlExe" | |
} | |
else | |
{ | |
Write-Error "ERROR: $curlPath not found." | |
Exit | |
} | |
} | |
$curlPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment