Skip to content

Commit

Permalink
Auto merge of #6060 - dwijnand:master, r=alexcrichton
Browse files Browse the repository at this point in the history
If creating a new GitSource, updating it is required before querying it

Fixes #6059
  • Loading branch information
bors committed Sep 20, 2018
2 parents 57ac392 + 494fdab commit cc550ef
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
16 changes: 16 additions & 0 deletions tests/testsuite/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cc550ef

Please sign in to comment.