Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zero exit code on failing `rustup update` #1095

Open
pgerber opened this Issue May 5, 2017 · 1 comment

Comments

3 participants
@pgerber
Copy link

pgerber commented May 5, 2017

I noticed that rustup update returns with a zero exit code even if it fails. This should be changed to ease the use in scripts.

peter@pg:~/rust/lo_migrate$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'beta-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: installing component 'rustc'
info: rolling back changes
error: failed to extract package
info: checking for self-updates

       stable-x86_64-unknown-linux-gnu unchanged - rustc 1.17.0 (56124baa9 2017-04-24)
         beta-x86_64-unknown-linux-gnu unchanged - rustc 1.18.0-beta.1 (4dce67253 2017-04-25)
  nightly-x86_64-unknown-linux-gnu update failed - rustc 1.19.0-nightly (2d4ed8e0c 2017-05-03)

peter@pg:~/rust/lo_migrate$ echo $?
0

I assume the error itself is caused by #1092.

@Diggsey Diggsey added this to Documentation & CLI in Issue Categorisation May 5, 2017

@brson brson added the bug label May 11, 2017

@brson

This comment has been minimized.

Copy link
Contributor

brson commented May 12, 2017

I do recall it was an intentional decision to swallow this error, but I can be persuaded that it should be an error. Let's go ahead and change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.