Skip to content
This repository has been archived by the owner on Jun 21, 2019. It is now read-only.

Commit

Permalink
Fix loading checksums from Cargo
Browse files Browse the repository at this point in the history
Looks like rust-lang/cargo#6500 accidentally broke the previous logic,
so let's load the checksums from elsewhere!
  • Loading branch information
alexcrichton committed Apr 12, 2019
1 parent 6c0cdb6 commit e3e5451
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ fn sync(
}
}

let mut checksums = HashMap::new();

for ws in workspaces {
let main_pkg = ws.current().map(|x| x.name().as_str()).unwrap_or("");
let (packages, resolve) =
Expand All @@ -271,6 +273,8 @@ fn sync(
.chain_err(|| "failed to fetch package")?
.clone(),
);

checksums.insert(pkg.clone(), resolve.checksums().get(&pkg).cloned());
}
}

Expand Down Expand Up @@ -388,7 +392,7 @@ fn sync(

// Finally, emit the metadata about this package
let json = serde_json::json!({
"package": pkg.summary().checksum(),
"package": checksums.get(id),
"files": map,
});

Expand Down

0 comments on commit e3e5451

Please sign in to comment.