Skip to content

Commit 09d90e5

Browse files
committed
Do not show "available paths" help in ./x.py clean
1 parent 2c78bb4 commit 09d90e5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/bootstrap/flags.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -253,17 +253,18 @@ Arguments:
253253
}
254254
});
255255

256-
// All subcommands can have an optional "Available paths" section
256+
// All subcommands except `clean` can have an optional "Available paths" section
257257
if matches.opt_present("verbose") {
258258
let config = Config::parse(&["build".to_string()]);
259259
let mut build = Build::new(config);
260260
metadata::build(&mut build);
261261

262262
let maybe_rules_help = Builder::get_help(&build, subcommand.as_str());
263263
extra_help.push_str(maybe_rules_help.unwrap_or_default().as_str());
264-
} else {
265-
extra_help.push_str(format!("Run `./x.py {} -h -v` to see a list of available paths.",
266-
subcommand).as_str());
264+
} else if subcommand.as_str() != "clean" {
265+
extra_help.push_str(format!(
266+
"Run `./x.py {} -h -v` to see a list of available paths.",
267+
subcommand).as_str());
267268
}
268269

269270
// User passed in -h/--help?
@@ -293,7 +294,7 @@ Arguments:
293294
}
294295
"clean" => {
295296
if paths.len() > 0 {
296-
println!("\nclean takes no arguments\n");
297+
println!("\nclean does not take a path argument\n");
297298
usage(1, &opts, &subcommand_help, &extra_help);
298299
}
299300

0 commit comments

Comments
 (0)