diff --git a/src/nix/registry.cc b/src/nix/registry.cc index 39d9702a0..44eaf89bc 100644 --- a/src/nix/registry.cc +++ b/src/nix/registry.cc @@ -189,6 +189,8 @@ struct CmdRegistryPin : RegistryCommand, EvalCommand auto lockedRef = parseFlakeRef(locked); registry->remove(ref.input); auto [accessor, resolved] = lockedRef.resolve(store).input.lazyFetch(store); + if (!resolved.isLocked()) + warn("flake '%s' is not locked", resolved.to_string()); fetchers::Attrs extraAttrs; if (ref.subdir != "") extraAttrs["dir"] = ref.subdir; registry->add(ref.input, resolved, extraAttrs);