1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

Fix follow path checking at depths greater than 2

We need to recurse into the input tree to handle follows paths that
trarverse multiple inputs that may or may not be follow paths
themselves.
This commit is contained in:
Alex Zero 2023-08-13 01:31:32 +01:00
parent 5542c1f87e
commit 1ef8008ca7
2 changed files with 64 additions and 1 deletions

View file

@ -345,7 +345,7 @@ void LockFile::check()
for (auto & [inputPath, input] : inputs) {
if (auto follows = std::get_if<1>(&input)) {
if (!follows->empty() && !get(inputs, *follows))
if (!follows->empty() && !findInput(*follows))
throw Error("input '%s' follows a non-existent input '%s'",
printInputPath(inputPath),
printInputPath(*follows));