Skip to content

Commit c6e93df

Browse files
committed
ci(win): workaround for broken curl 8.8.0 --write-out opt in latest win runner update
1 parent 13cf384 commit c6e93df

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
macos-14,
3434
macos-12,
3535
ubuntu-latest,
36-
# windows-latest
36+
windows-latest
3737
]
3838

3939
env:
@@ -88,7 +88,7 @@ jobs:
8888
macos-14,
8989
macos-12,
9090
ubuntu-latest,
91-
# windows-latest
91+
windows-latest
9292
]
9393
env:
9494
NODE_VERSION: ${{ matrix.node-version }}

script/lib/download-file.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,19 @@ function download_to {
1616
OUTPUT_FILE="$2"
1717
debug_log "doing curl of: '$URL', saving in $OUTPUT_FILE"
1818

19-
HTTP_CODE="$(curl --silent --output "$OUTPUT_FILE" --write-out "%{http_code}" --location "$URL")"
19+
if [[ "$(uname -m)" == "Darwin" ]] || [[ "$(uname -m)" == "Linux" ]]; then
20+
HTTP_CODE="$(curl --silent --output "$OUTPUT_FILE" --write-out "%{http_code}" --location "$URL")"
21+
else
22+
# temp workaround for curl 8.8.x error on windows gha runners
23+
# https://github.com/curl/curl/issues/13845
24+
curl --silent --output "$OUTPUT_FILE" --location "$URL"
25+
if [ $? -ne 0 ]; then
26+
error "Unable to download file at url ${URL}"
27+
exit 1
28+
else
29+
HTTP_CODE=200
30+
fi
31+
fi
2032
debug_log "did curl, http code was '${HTTP_CODE}'"
2133
if [[ "${HTTP_CODE}" -lt 200 || "${HTTP_CODE}" -gt 299 ]] ; then
2234
error "Unable to download file at url ${URL}"

0 commit comments

Comments
 (0)