Skip to content

Correctly propagate subshell failures in rustup-init#3012

Merged
kinnison merged 2 commits intorust-lang:masterfrom
SabrinaJewson:subshell-ensure
Jul 16, 2022
Merged

Correctly propagate subshell failures in rustup-init#3012
kinnison merged 2 commits intorust-lang:masterfrom
SabrinaJewson:subshell-ensure

Conversation

@SabrinaJewson
Copy link
Copy Markdown
Contributor

If mktemp -d were to fail in the current script, rustup-init.sh would report the error but keep running anyway. This fixes that by checking for a nonzero exit status and if so exiting the outer shell.

Copy link
Copy Markdown
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thank you for catching this odd corner case

@kinnison kinnison merged commit 6264e98 into rust-lang:master Jul 16, 2022
@SabrinaJewson SabrinaJewson deleted the subshell-ensure branch July 16, 2022 10:23
AJ-Ianozi pushed a commit to AJ-Ianozi/getada-download that referenced this pull request Oct 12, 2023
Correctly propagate subshell failures in rustup-init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants