Skip to content

Commit

Permalink
Solve issue with path curl.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Sep 28, 2023
1 parent 0ae7252 commit f71fae5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/metacall-environment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,19 @@ function Set-Curl {
Set-Location $ROOT_DIR
$RuntimeDir = "$env:ProgramFiles\curl"
$DepsDir = "$ROOT_DIR\dependencies"
$Version = "8.3.0_2"

if (!(Test-Path -Path "$DepsDir\curl.zip")) {
# Download installer
Write-Output "Curl not found downloading now..."
(New-Object Net.WebClient).DownloadFile("https://curl.se/windows/dl-8.3.0_2/curl-8.3.0_2-win64-mingw.zip", "$DepsDir\curl.zip")
(New-Object Net.WebClient).DownloadFile("https://curl.se/windows/dl-$Version/curl-$Version-win64-mingw.zip", "$DepsDir\curl.zip")
}

Set-Location $DepsDir

7z x "$DepsDir\curl.zip"

robocopy /move /e "$DepsDir\curl-8.1.2_3-win64-mingw" $RuntimeDir
robocopy /move /e "$DepsDir\curl-$Version-win64-mingw" $RuntimeDir

Add-to-Path "$RuntimeDir\bin"

Expand Down

0 comments on commit f71fae5

Please sign in to comment.