]> git.lizzy.rs Git - rust.git/commitdiff
Fail ./x.py on invalid command
authorMichal 'vorner' Vaner <vorner@vorner.cz>
Sun, 27 Aug 2017 17:20:03 +0000 (19:20 +0200)
committerMichal 'vorner' Vaner <vorner@vorner.cz>
Sun, 27 Aug 2017 17:20:03 +0000 (19:20 +0200)
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

src/bootstrap/flags.rs

index a84d43d3deedef29b70483cfcfc7e29d36e9d702..7546d7fd4f07af7405c217aa4f718082566d4643 100644 (file)
@@ -136,7 +136,7 @@ pub fn parse(args: &[String]) -> Flags {
             None => {
                 // No subcommand -- show the general usage and subcommand help
                 println!("{}\n", subcommand_help);
-                process::exit(0);
+                process::exit(1);
             }
         };