Skip to content

Commit

Permalink
Fail ./x.py on invalid command
Browse files Browse the repository at this point in the history
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
vorner committed Aug 27, 2017
1 parent eb8f258 commit 6fc35de
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 6fc35de

Please sign in to comment.