Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 9 additions & 9 deletions src/config_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ pub(crate) fn fixes_for_problem(problem: &Problem, config: &Config) -> Vec<Box<d
perm_sel: PermSel::for_primary(pkg_id.pkg_name()),
}));
}
Problem::ExecutionFailed(failure) => {
if failure.output.sandbox_config.kind != Some(SandboxKind::Disabled) {
let perm_sel = PermSel::for_build_script(failure.crate_sel.pkg_name());
if !failure.output.sandbox_config.allow_network.unwrap_or(false) {
edits.push(Box::new(SandboxAllowNetwork {
perm_sel: perm_sel.clone(),
}));
}
edits.push(Box::new(DisableSandbox { perm_sel }));
Problem::ExecutionFailed(failure)
if failure.output.sandbox_config.kind != Some(SandboxKind::Disabled) =>
{
let perm_sel = PermSel::for_build_script(failure.crate_sel.pkg_name());
if !failure.output.sandbox_config.allow_network.unwrap_or(false) {
edits.push(Box::new(SandboxAllowNetwork {
perm_sel: perm_sel.clone(),
}));
}
edits.push(Box::new(DisableSandbox { perm_sel }));
}
Problem::DisallowedBuildInstruction(failure) => {
edits.append(&mut edits_for_build_instruction(failure));
Expand Down
6 changes: 1 addition & 5 deletions src/crate_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,7 @@ impl CrateIndex {
if let Some(pkg_id) = self.dir_to_pkg_id.get(path) {
return Some(pkg_id);
}
if let Some(parent) = path.parent() {
path = parent;
} else {
return None;
}
path = path.parent()?;
}
}

Expand Down
Loading
Loading