Skip to content

Commit

Permalink
Use if instead of $?
Browse files Browse the repository at this point in the history
  • Loading branch information
SabrinaJewson committed Jun 19, 2022
1 parent e5748eb commit 34c32a8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ main() {
local _url="${RUSTUP_UPDATE_ROOT}/dist/${_arch}/rustup-init${_ext}"

local _dir
_dir="$(ensure mktemp -d)"
# Because the previous command ran in a subshell, we must manually propagate
# exit status.
[ $? -ne 0 ] && exit 1
if ! _dir="$(ensure mktemp -d)"; then
# Because the previous command ran in a subshell, we must manually
# propagate exit status.
exit 1
fi
local _file="${_dir}/rustup-init${_ext}"

local _ansi_escapes_are_valid=false
Expand Down

0 comments on commit 34c32a8

Please sign in to comment.