Skip to content

Commit e5748eb

Browse files
committed
Correctly propagate subshell failures in rustup-init
1 parent 20ed5d9 commit e5748eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rustup-init.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ main() {
7373

7474
local _dir
7575
_dir="$(ensure mktemp -d)"
76+
# Because the previous command ran in a subshell, we must manually propagate
77+
# exit status.
78+
[ $? -ne 0 ] && exit 1
7679
local _file="${_dir}/rustup-init${_ext}"
7780

7881
local _ansi_escapes_are_valid=false

0 commit comments

Comments
 (0)