-
Notifications
You must be signed in to change notification settings - Fork 892
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
fix(rustup-mode): return ExitCode(1)
when update()
fails
#3952
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems okay. Personally I feel like use of the custom ExitCode
is a bad abstraction. One idea I've played with is that we should change types to be Result<T, Option<E>>
, where the Some
represents an error that should be yielded by the top-level caller while None
means the error has already been reported. (We then report ExitCode::FAILURE
if the Result
is Err
.)
@djc Indeed, in other projects that I've worked with my principle is that we should never expose the exit code with the single exception of the main module, where some But that kind of change is clearly out of the scope of this PR... |
5d54796
to
cecc7e0
Compare
cecc7e0
to
ad271f1
Compare
Closes #3476, verified via local testing.