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

Closed
pgerber opened this issue May 5, 2017 · 3 comments
Closed

zero exit code on failing rustup update #1095

pgerber opened this issue May 5, 2017 · 3 comments

Comments

@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.

@brson
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.

@kellda
Copy link
Contributor

kellda commented Feb 11, 2021

Is it fixed ? I tried rustup update nightly (not having nightly installed), once with no connection, once with not enough space to download and once with not enough space to unpack and got 1 every time.

@rbtcollins
Copy link
Contributor

I think so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants