mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-23 22:14:15 +00:00
Do not show "available paths" help in ./x.py clean
This commit is contained in:
parent
2c78bb49fd
commit
09d90e5268
@ -253,7 +253,7 @@ Arguments:
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// All subcommands can have an optional "Available paths" section
|
// All subcommands except `clean` can have an optional "Available paths" section
|
||||||
if matches.opt_present("verbose") {
|
if matches.opt_present("verbose") {
|
||||||
let config = Config::parse(&["build".to_string()]);
|
let config = Config::parse(&["build".to_string()]);
|
||||||
let mut build = Build::new(config);
|
let mut build = Build::new(config);
|
||||||
@ -261,9 +261,10 @@ Arguments:
|
|||||||
|
|
||||||
let maybe_rules_help = Builder::get_help(&build, subcommand.as_str());
|
let maybe_rules_help = Builder::get_help(&build, subcommand.as_str());
|
||||||
extra_help.push_str(maybe_rules_help.unwrap_or_default().as_str());
|
extra_help.push_str(maybe_rules_help.unwrap_or_default().as_str());
|
||||||
} else {
|
} else if subcommand.as_str() != "clean" {
|
||||||
extra_help.push_str(format!("Run `./x.py {} -h -v` to see a list of available paths.",
|
extra_help.push_str(format!(
|
||||||
subcommand).as_str());
|
"Run `./x.py {} -h -v` to see a list of available paths.",
|
||||||
|
subcommand).as_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// User passed in -h/--help?
|
// User passed in -h/--help?
|
||||||
@ -293,7 +294,7 @@ Arguments:
|
|||||||
}
|
}
|
||||||
"clean" => {
|
"clean" => {
|
||||||
if paths.len() > 0 {
|
if paths.len() > 0 {
|
||||||
println!("\nclean takes no arguments\n");
|
println!("\nclean does not take a path argument\n");
|
||||||
usage(1, &opts, &subcommand_help, &extra_help);
|
usage(1, &opts, &subcommand_help, &extra_help);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user