Skip to content

Return 0 as an exit status when no subcommand is given to bootstrap - #45535

Merged
bors merged 1 commit into
rust-lang:masterfrom
topecongiro:bootstrap-exit-code
Oct 28, 2017
Merged

Return 0 as an exit status when no subcommand is given to bootstrap#45535
bors merged 1 commit into
rust-lang:masterfrom
topecongiro:bootstrap-exit-code

Conversation

@topecongiro

Copy link
Copy Markdown
Contributor

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.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@kennytmkennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 26, 2017

@kennytmkennytm left a comment

Copy link
Copy Markdown
Member

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?

@topecongiro

Copy link
Copy Markdown
ContributorAuthor

@kennytm Thank you for the review! I updated the PR so that ./x.py returns 0 and ./x.py nonsense returns 1.

@kennytmkennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 26, 2017

@kennytmkennytm left a comment

Copy link
Copy Markdown
Member

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.

Comment threadsrc/bootstrap/flags.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: invlaidinvalid.

@topecongiro

Copy link
Copy Markdown
ContributorAuthor

@kennytm Thanks again, fixed a typo and rebased.

@kennytm

Copy link
Copy Markdown
Member

@bors r+ rollup

Thanks!

@bors

bors commented Oct 27, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 732d9b2 has been approved by kennytm

@kennytmkennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 27, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Oct 28, 2017
…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.
@frewsxcvfrewsxcv mentioned this pull request Oct 28, 2017
kennytm added a commit to kennytm/rust that referenced this pull request Oct 28, 2017
…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.
@kennytmkennytm mentioned this pull request Oct 28, 2017
bors added a commit that referenced this pull request Oct 28, 2017
Rollup of 7 pull requests
- Successful merges: #45421, #45449, #45505, #45535, #45549, #45574, #45585
- Failed merges:
@bors
bors merged commit 732d9b2 into rust-lang:masterOct 28, 2017
@topecongiro
topecongiro deleted the bootstrap-exit-code branch October 28, 2017 12:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@topecongiro@rust-highfive@kennytm@bors@nikomatsakis