Skip to content

Commit a36dd05

Browse files
committed
refactor(package): Name the conditions for local_reg
1 parent 4b291a0 commit a36dd05

File tree

1 file changed

+3
-3
lines changed
  • src/cargo/ops/cargo_package

1 file changed

+3
-3
lines changed

src/cargo/ops/cargo_package/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ fn do_package<'a>(
274274
//
275275
// If they explicitly passed a registry on the CLI, we check it no matter what to verify
276276
// `package.publish`.
277-
let mut local_reg = if (deps.has_dependencies() && (opts.include_lockfile || opts.verify))
278-
|| opts.reg_or_index.is_some()
279-
{
277+
let needs_local_reg = deps.has_dependencies() && (opts.include_lockfile || opts.verify);
278+
let verify_registry_allow_list = opts.reg_or_index.is_some();
279+
let mut local_reg = if needs_local_reg || verify_registry_allow_list {
280280
let sid = get_registry(ws.gctx(), &just_pkgs, opts.reg_or_index.clone())?;
281281
debug!("packaging for registry {}", sid);
282282
let reg_dir = ws.build_dir().join("package").join("tmp-registry");

0 commit comments

Comments
 (0)