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
14 changes: 8 additions & 6 deletions crates/socket-patch-cli/src/commands/scan/hosted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,12 @@ pub(super) async fn run_redirect(
&pairs,
scan_result,
npm_prior,
Some(
super::rollout::Gate::new(stage, rows)
.with_prior(prior)
.with_references(references),
),
Some(super::rollout::Gate {
stage,
rows,
prior,
references,
}),
"scan",
)
.await
Expand Down Expand Up @@ -1057,7 +1058,8 @@ async fn run_redirect_selected_untracked(
let may_write = rollout.as_ref().is_none_or(|gate| {
let new = gate.new_keys();
candidates.iter().any(|c| {
!new.contains(&(sel_purl(c), c.dep.patch_uuid.clone())) || gate.may_admit(&sel_purl(c))
let purl = sel_purl(c);
gate.stage.may_admit(&purl) || !new.contains(&(purl, c.dep.patch_uuid.clone()))
})
});
let mut lock: Option<LockGuard> = if !common.dry_run && !candidates.is_empty() && may_write {
Expand Down
13 changes: 7 additions & 6 deletions crates/socket-patch-cli/src/commands/scan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,7 @@ async fn run_project_dirs(
Err(message) => return usage("invalid_env", &message),
};
let root = std::fs::canonicalize(&args.common.cwd).unwrap_or_else(|_| args.common.cwd.clone());
let carry = rollout_args::RolloutCarry::new(configured, root);
let carry = rollout::RolloutCarry::new(configured, root);
let mut code = 0;
for (dir, explicit) in &dirs {
if dirs.len() > 1 && !args.common.silent {
Expand Down Expand Up @@ -3258,11 +3258,12 @@ async fn run_scan(
&pairs,
None,
npm_crawl.as_ref(),
Some(
rollout::Gate::new(&mut stage, rows)
.with_prior(prior_discovery)
.with_references(sweep_references),
),
Some(rollout::Gate {
stage: &mut stage,
rows,
prior: prior_discovery,
references: sweep_references,
}),
"scan",
)
.await;
Expand Down
Loading
Loading