Merge pull request #2093 from topecongiro/ignore-nontrivial-dependencies

Do not propagate io error when dependencies are not found
This commit is contained in:
Nick Cameron 2017-10-28 21:48:00 +13:00 committed by GitHub
commit fc926dc52a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,8 +330,13 @@ fn get_targets(workspace_hitlist: &WorkspaceHitlist) -> Result<Vec<Target>, io::
// If we can find any local dependencies, we will try to get targets from those as well.
for path in get_path_to_local_dependencies(&packages) {
env::set_current_dir(path)?;
targets.append(&mut get_targets(workspace_hitlist)?);
match env::set_current_dir(path) {
Ok(..) => match get_targets(workspace_hitlist) {
Ok(ref mut t) => targets.append(t),
Err(..) => continue,
},
Err(..) => continue,
}
}
env::set_current_dir(cur_dir)?;