Rename --roots to --root (with alias for back compat) (#861)

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Félix Saparelli 2023-03-06 14:05:32 +13:00 committed by GitHub
parent 44e81c7e1a
commit ee909e4045
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -195,8 +195,8 @@ pub struct Args {
/// the metadata files inside the path you specified. /// the metadata files inside the path you specified.
/// ///
/// NOTE that `--install-path` takes precedence over this option. /// NOTE that `--install-path` takes precedence over this option.
#[clap(help_heading = "Options", long)] #[clap(help_heading = "Options", long, alias = "roots")]
pub roots: Option<PathBuf>, pub root: Option<PathBuf>,
/// This option will be passed through to all `cargo-install` invocations. /// This option will be passed through to all `cargo-install` invocations.
/// ///

View file

@ -53,7 +53,7 @@ pub async fn install_crates(args: Args, jobserver_client: LazyJobserverClient) -
.collect(); .collect();
// Compute paths // Compute paths
let cargo_root = args.roots; let cargo_root = args.root;
let (install_path, mut manifests, temp_dir) = let (install_path, mut manifests, temp_dir) =
compute_paths_and_load_manifests(cargo_root.clone(), args.install_path)?; compute_paths_and_load_manifests(cargo_root.clone(), args.install_path)?;