Skip to content

zero exit code on failing rustup update #1095

@pgerber

Description

@pgerber

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions