1
1
Fork 0
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:
Eelco Dolstra 2025-06-12 20:38:51 +02:00
parent 637c4f3ad7
commit b415faceca
2 changed files with 15 additions and 1 deletions

View file

@ -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;
}