mirror of
https://github.com/NixOS/nix.git
synced 2025-11-18 08:19:35 +01:00
Merge pull request #14574 from pkpbynum/pb/fix-registry-pin
Fix registry pin ref lookup
This commit is contained in:
commit
f8141a2c26
1 changed files with 1 additions and 1 deletions
|
|
@ -189,7 +189,6 @@ struct CmdRegistryPin : RegistryCommand, EvalCommand
|
|||
auto registry = getRegistry();
|
||||
auto ref = parseFlakeRef(fetchSettings, url);
|
||||
auto lockedRef = parseFlakeRef(fetchSettings, locked);
|
||||
registry->remove(ref.input);
|
||||
auto resolvedInput = lockedRef.resolve(fetchSettings, store).input;
|
||||
auto resolved = resolvedInput.getAccessor(fetchSettings, store).second;
|
||||
if (!resolved.isLocked(fetchSettings))
|
||||
|
|
@ -197,6 +196,7 @@ struct CmdRegistryPin : RegistryCommand, EvalCommand
|
|||
fetchers::Attrs extraAttrs;
|
||||
if (ref.subdir != "")
|
||||
extraAttrs["dir"] = ref.subdir;
|
||||
registry->remove(ref.input);
|
||||
registry->add(ref.input, resolved, extraAttrs);
|
||||
registry->write(getRegistryPath());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue