Skip to content

Commit ffc5f14

Browse files
committed
fix: more bash fixes
Fixes as indicated by shellcheck
1 parent d8f29e8 commit ffc5f14

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

install-shared.bash

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ download_release_tarball() {
3030
--header "Accept:application/octet-stream" \
3131
--location \
3232
--output /dev/null \
33-
-w %{url_effective} \
33+
-w '%{url_effective}' \
3434
"{$__release_url}")
3535

36-
curl --retry 3 --output "${__tar_path}" "${__asset_url}"
37-
if [[ $? -ne "0" ]]; then
36+
if ! curl --retry 3 --output "${__tar_path}" "${__asset_url}"; then
3837
(>&2 echo "failed to download release asset (tag URL: ${__release_tag_url}, asset URL: ${__asset_url})")
3938
return 1
4039
fi
@@ -62,7 +61,7 @@ build_from_source() {
6261
exit 1
6362
fi
6463

65-
pushd "${__rust_sources_path}"
64+
pushd "${__rust_sources_path}" || exit
6665

6766
cargo --version
6867

@@ -72,5 +71,5 @@ build_from_source() {
7271
cargo build --release --all
7372
fi
7473

75-
popd
74+
popd || exit
7675
}

0 commit comments

Comments
 (0)