Skip to content

Commit df1cab8

Browse files
authored
fix(ci): assign the http status variable (#1901)
1 parent d2e77db commit df1cab8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/ci/jobs/diff-dumps.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ scanner_v2_create_and_upload_bundle() {
111111
# and add V4 definitions to the latest offline bundle. It determines the
112112
# version to use for each release based on the contents of the
113113
# VULNERABILITY_VERSION file present in each release tag.
114-
#
114+
# shellcheck disable=SC2120
115115
scanner_v4_create_and_add_bundles() {
116116
local latest_bundle="${1:-scanner-vuln-updates.zip}"
117117

@@ -152,17 +152,20 @@ scanner_v4_create_and_add_bundles() {
152152
*)
153153
info "fetching schema version for release $release"
154154
tmp=$(mktemp)
155+
# shellcheck disable=SC2059
155156
vuln_version_url=$(printf "$vuln_version_pattern" "$release")
156-
case $($curl --write-out "%{http_code}" -o "$tmp" "$vuln_version_url") in
157+
local http_status
158+
http_status=$($curl --write-out "%{http_code}" -o "$tmp" "$vuln_version_url")
159+
case $http_status in
157160
200)
158-
version=$(cat $tmp)
161+
version=$(cat "$tmp")
159162
;;
160163
404)
161164
info "release tag not found, assuming the release was not cut, skipping..."
162165
continue
163166
;;
164167
*)
165-
die "failed to fetch the v4 offline bundle version for $release: status $status"
168+
die "failed to fetch the v4 offline bundle version for $release: status $http_status"
166169
;;
167170
esac
168171
;;

0 commit comments

Comments
 (0)