Skip to content

Commit

Permalink
Rollup merge of rust-lang#44134 - vorner:x-py-unknown-cmd, r=nikomats…
Browse files Browse the repository at this point in the history
…akis

Fail ./x.py on invalid command

Make the ./x.py script fail when run with an invalid command, like:

```
./x.py nonsense
```

This helps in case of chaining multiple runs, eg.:

```
./x.py biuld && ./x.py test
```
  • Loading branch information
Ariel Ben-Yehuda authored Aug 29, 2017
2 parents 29f360b + 6fc35de commit d59aa7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");
None => {
// No subcommand -- show the general usage and subcommand help
println!("{}\n", subcommand_help);
process::exit(0);
process::exit(1);
}
};

Expand Down

0 comments on commit d59aa7d

Please sign in to comment.