Skip to content

Commit

Permalink
don't assume everything is in the sysroot
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Dec 15, 2018
1 parent b339557 commit d12aedd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sysroot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,11 @@ impl Blueprint {
}

if !map.contains_key("path") && !map.contains_key("git") {
let path = src.path().join(format!("lib{}", k)).display().to_string();

map.insert("path".to_owned(), Value::String(path));
// No path and no git given. This might be in the sysroot, but if we don't find it there we assume it comes from crates.io.
let path = src.path().join(format!("lib{}", k));
if path.exists() {
map.insert("path".to_owned(), Value::String(path.display().to_string()));
}
}

blueprint.push(stage, k, map, src);
Expand Down

0 comments on commit d12aedd

Please sign in to comment.