mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 14:56:15 +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…
Reference in a new issue