Added the cargo dev remove command for convenience
This commit is contained in:
@@ -38,9 +38,14 @@ fn main() {
|
||||
},
|
||||
("setup", Some(sub_command)) => match sub_command.subcommand() {
|
||||
("intellij", Some(matches)) => setup::intellij::run(matches.value_of("rustc-repo-path")),
|
||||
("git-hook", Some(matches)) => setup::git_hook::run(matches.is_present("force-override")),
|
||||
("git-hook", Some(matches)) => setup::git_hook::install_hook(matches.is_present("force-override")),
|
||||
_ => {},
|
||||
},
|
||||
("remove", Some(sub_command)) => {
|
||||
if let ("git-hook", Some(_)) = sub_command.subcommand() {
|
||||
setup::git_hook::remove_hook();
|
||||
}
|
||||
},
|
||||
("serve", Some(matches)) => {
|
||||
let port = matches.value_of("port").unwrap().parse().unwrap();
|
||||
let lint = matches.value_of("lint");
|
||||
@@ -173,6 +178,12 @@ fn get_clap_config<'a>() -> ArgMatches<'a> {
|
||||
),
|
||||
),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("remove")
|
||||
.about("Support for undoing changes done by the setup command")
|
||||
.setting(AppSettings::ArgRequiredElseHelp)
|
||||
.subcommand(SubCommand::with_name("git-hook").about("Remove any existing pre-commit git hook")),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("serve")
|
||||
.about("Launch a local 'ALL the Clippy Lints' website in a browser")
|
||||
|
||||
Reference in New Issue
Block a user