Skip to content

Commit ef61eeb

Browse files
committed
Use powershell instead of bash to install curl.
1 parent 9e625df commit ef61eeb

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

.github/actions/install-curl/action.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,29 @@ runs:
3232
- name: Install CURL for Windows
3333
if: runner.os == 'Windows'
3434
id: windows-action
35-
shell: bash
35+
shell: pwsh
3636
run: |
3737
# Download CURL 8.16.0 with OpenSSL for Windows (MinGW build, compatible with MSVC)
38-
curl -L https://curl.se/windows/dl-8.16.0_6/curl-8.16.0_6-win64-mingw.zip -o curl.zip
38+
$url = "https://curl.se/windows/dl-8.16.0_6/curl-8.16.0_6-win64-mingw.zip"
39+
$output = "curl.zip"
40+
41+
Write-Host "Downloading CURL from $url"
42+
Invoke-WebRequest -Uri $url -OutFile $output -MaximumRetryCount 3 -RetryIntervalSec 5
43+
44+
# Verify the download
45+
$fileInfo = Get-Item $output
46+
Write-Host "Downloaded file size: $($fileInfo.Length) bytes"
3947
4048
# Extract to C:\curl-install
41-
7z x curl.zip -oC:\curl-install
49+
Write-Host "Extracting CURL archive..."
50+
Expand-Archive -Path $output -DestinationPath "C:\curl-install" -Force
51+
52+
# Verify extraction
53+
Write-Host "Extracted contents:"
54+
Get-ChildItem -Path "C:\curl-install" -Recurse -Depth 1
4255
4356
# The archive extracts to a subdirectory named curl-8.16.0_6-win64-mingw
44-
echo "CURL_ROOT=C:\\curl-install\\curl-8.16.0_6-win64-mingw" >> $GITHUB_OUTPUT
57+
echo "CURL_ROOT=C:\curl-install\curl-8.16.0_6-win64-mingw" >> $env:GITHUB_OUTPUT
4558
4659
- name: Determine root
4760
id: determine-root

0 commit comments

Comments
 (0)