diff --git a/src/cargo/ops/cargo_install.rs b/src/cargo/ops/cargo_install.rs index 3f4593291d8..55d70ec9192 100644 --- a/src/cargo/ops/cargo_install.rs +++ b/src/cargo/ops/cargo_install.rs @@ -169,7 +169,7 @@ fn install_one( krate, vers, config, - is_first_install, + true, &mut |git| git.read_packages(), )? } else if source_id.is_path() { diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index 968065d4368..928f6224154 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -283,6 +283,22 @@ fn multiple_crates_select() { assert_has_installed_exe(cargo_home(), "bar"); } +#[test] +fn multiple_crates_git_all() { + let p = git::repo(&paths::root().join("foo")) + .file("Cargo.toml", r#"\ +[workspace] +members = ["bin1", "bin2"] +"#) + .file("bin1/Cargo.toml", &basic_manifest("bin1", "0.1.0")) + .file("bin2/Cargo.toml", &basic_manifest("bin2", "0.1.0")) + .file("bin1/src/main.rs", r#"fn main() { println!("Hello, world!"); }"#) + .file("bin2/src/main.rs", r#"fn main() { println!("Hello, world!"); }"#) + .build(); + + cargo_process(&format!("install --git {} bin1 bin2", p.url().to_string())).run(); +} + #[test] fn multiple_crates_auto_binaries() { let p = project()