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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user