Skip to content

Do not propagate io error when dependencies are not found #2093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/bin/cargo-fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down