mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 14:02:42 +01:00
Don't allow flake inputs to have both a flakeref and a follows
Having both doesn't make sense so it's best to disallow it. If this causes issues we could turn into a warning.
This commit is contained in:
parent
637c4f3ad7
commit
b415faceca
2 changed files with 15 additions and 1 deletions
|
|
@ -170,6 +170,9 @@ static FlakeInput parseFlakeInput(
|
|||
input.ref = parseFlakeRef(state.fetchSettings, *url, {}, true, input.isFlake, true);
|
||||
}
|
||||
|
||||
if (input.ref && input.follows)
|
||||
throw Error("flake input has both a flake reference and a follows attribute, at %s", state.positions[pos]);
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue