From ee909e4045fc2ab60c3b40e6bbd6c9e7f13175f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Saparelli?= Date: Mon, 6 Mar 2023 14:05:32 +1300 Subject: [PATCH] Rename --roots to --root (with alias for back compat) (#861) Co-authored-by: Jiahao XU --- crates/bin/src/args.rs | 4 ++-- crates/bin/src/entry.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bin/src/args.rs b/crates/bin/src/args.rs index f2401288..8823cd12 100644 --- a/crates/bin/src/args.rs +++ b/crates/bin/src/args.rs @@ -195,8 +195,8 @@ pub struct Args { /// the metadata files inside the path you specified. /// /// NOTE that `--install-path` takes precedence over this option. - #[clap(help_heading = "Options", long)] - pub roots: Option, + #[clap(help_heading = "Options", long, alias = "roots")] + pub root: Option, /// This option will be passed through to all `cargo-install` invocations. /// diff --git a/crates/bin/src/entry.rs b/crates/bin/src/entry.rs index 553fd032..f981d15f 100644 --- a/crates/bin/src/entry.rs +++ b/crates/bin/src/entry.rs @@ -53,7 +53,7 @@ pub async fn install_crates(args: Args, jobserver_client: LazyJobserverClient) - .collect(); // Compute paths - let cargo_root = args.roots; + let cargo_root = args.root; let (install_path, mut manifests, temp_dir) = compute_paths_and_load_manifests(cargo_root.clone(), args.install_path)?;