-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Return 0 as an exit status when no subcommand is given to bootstrap #45535
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
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.
The error code was explicitly changed from 0 to 1 in #44134. Could you ensure ./x.py nonsense
still returns nonzero?
5fefa01
to
fa2bc78
Compare
@kennytm Thank you for the review! I updated the PR so that |
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.
Minor nit. r=me after this is fixed.
src/bootstrap/flags.rs
Outdated
@@ -136,9 +136,12 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`"); | |||
let subcommand = match subcommand { | |||
Some(s) => s, | |||
None => { | |||
// No subcommand -- show the general usage and subcommand help | |||
// No or an invlaid subcommand -- show the general usage and subcommand help |
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.
Typo: invlaid
↦ invalid
.
fa2bc78
to
732d9b2
Compare
@kennytm Thanks again, fixed a typo and rebased. |
@bors r+ rollup Thanks! |
📌 Commit 732d9b2 has been approved by |
…kennytm Return 0 as an exit status when no subcommand is given to bootstrap Running `./x.py` emits usage and error messages when no subcommand is given: ``` Usage: x.py <subcommand> [options] [<paths>...] Subcommands: build Compile either the compiler or libraries test Build and run some test suites bench Build and run some benchmarks doc Build documentation clean Clean out build directories dist Build distribution artifacts install Install distribution artifacts To learn more about a subcommand, run `./x.py <subcommand> -h` failed to run: /home/topecongiro/rust/build/bootstrap/debug/bootstrap ``` IMHO the last line is unnecessary. This PR removes it by changing the return code of `bootstrap` to 0 when no sub command is given.
…kennytm Return 0 as an exit status when no subcommand is given to bootstrap Running `./x.py` emits usage and error messages when no subcommand is given: ``` Usage: x.py <subcommand> [options] [<paths>...] Subcommands: build Compile either the compiler or libraries test Build and run some test suites bench Build and run some benchmarks doc Build documentation clean Clean out build directories dist Build distribution artifacts install Install distribution artifacts To learn more about a subcommand, run `./x.py <subcommand> -h` failed to run: /home/topecongiro/rust/build/bootstrap/debug/bootstrap ``` IMHO the last line is unnecessary. This PR removes it by changing the return code of `bootstrap` to 0 when no sub command is given.
Running
./x.py
emits usage and error messages when no subcommand is given:IMHO the last line is unnecessary. This PR removes it by changing the return code of
bootstrap
to 0 when no sub command is given.