mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
nix registry pin: Warn if the resolved flake is not locked
This commit is contained in:
parent
184c6605b0
commit
a3427a1478
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue