Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5575515

Browse files
committed
fix: installation script with curl 8.8.0
1 parent528d713 commit5575515

File tree

3 files changed

+36
-7
lines changed

3 files changed

+36
-7
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88

99
jobs:
1010

11-
main:
12-
name:Main Process
11+
check-code:
12+
name:Check code
1313
runs-on:ubuntu-latest
1414
env:
1515
GO_VERSION:stable
@@ -44,3 +44,13 @@ jobs:
4444
4545
-name:Make
4646
run:make
47+
48+
check-local-install-script:
49+
name:Installation script (local)
50+
strategy:
51+
matrix:
52+
os:[ubuntu-latest, macos-latest, windows-latest]
53+
runs-on:${{ matrix.os }}
54+
steps:
55+
-name:Check installation script
56+
run:cat ./install-misspell.sh | sh -s -- -d -b "./install-misspell"

‎.github/workflows/post-release.yml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ on:
55
-published
66

77
jobs:
8-
install:
9-
name:Install script
8+
check-install-script:
9+
name:Installation script (remote)
1010
strategy:
1111
matrix:
12-
os:[ubuntu-latest, macos-latest]
13-
# os: [ubuntu-latest, macos-latest, windows-latest] # windows has a problem when curl use `%{http_code}`, it returns 000 instead of 200.
12+
os:[ubuntu-latest, macos-latest, windows-latest]
1413
runs-on:${{ matrix.os }}
1514

1615
steps:
17-
-run:curl -sSfL https://raw.githubusercontent.com/golangci/misspell/master/install-misspell.sh | sh -s -- -b "./bin-misspell"
16+
-run:curl -sSfL https://raw.githubusercontent.com/golangci/misspell/master/install-misspell.sh | sh -s -- -b "./install-misspell"

‎install-misspell.sh‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,26 @@ http_download_curl() {
240240
local_file=$1
241241
source_url=$2
242242
header=$3
243+
244+
# workaround https://github.com/curl/curl/issues/13845
245+
curl_version=$(curl --version| head -n 1| awk'{ print $2 }')
246+
if ["$curl_version"="8.8.0" ];then
247+
log_debug"http_download_curl curl$curl_version detected"
248+
if [-z"$header" ];then
249+
curl -sL -o"$local_file""$source_url"
250+
else
251+
curl -sL -H"$header" -o"$local_file""$source_url"
252+
253+
nf=$(cat"$local_file"| jq -r'.error // ""')
254+
if [!-z"$nf" ];then
255+
log_debug"http_download_curl received an error:$nf"
256+
return 1
257+
fi
258+
fi
259+
260+
return 0
261+
fi
262+
243263
if [-z"$header" ];then
244264
code=$(curl -w'%{http_code}' -sL -o"$local_file""$source_url")
245265
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp