Skip to content

Instantly share code, notes, and snippets.

@marcduiker
Created November 1, 2015 00:05
Show Gist options
  • Save marcduiker/345f5aa6e0e55accb81b to your computer and use it in GitHub Desktop.
Save marcduiker/345f5aa6e0e55accb81b to your computer and use it in GitHub Desktop.
<#
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