We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f5ae25 commit 732d9b2Copy full SHA for 732d9b2
src/bootstrap/flags.rs
@@ -136,9 +136,12 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");
136
let subcommand = match subcommand {
137
Some(s) => s,
138
None => {
139
- // No subcommand -- show the general usage and subcommand help
+ // No or an invalid subcommand -- show the general usage and subcommand help
140
+ // An exit code will be 0 when no subcommand is given, and 1 in case of an invalid
141
+ // subcommand.
142
println!("{}\n", subcommand_help);
- process::exit(1);
143
+ let exit_code = if args.is_empty() { 0 } else { 1 };
144
+ process::exit(exit_code);
145
}
146
};
147
0 commit comments