mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
substitution-goal: convert assert into an Error
This is to get more context on https://github.com/NixOS/nix/issues/12761
This commit is contained in:
parent
ca165f09c0
commit
7a6ce75aea
1 changed files with 7 additions and 2 deletions
|
@ -174,8 +174,13 @@ Goal::Co PathSubstitutionGoal::tryToRun(StorePath subPath, nix::ref<Store> sub,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto & i : info->references)
|
for (auto & i : info->references)
|
||||||
if (i != storePath) /* ignore self-references */
|
/* ignore self-references */
|
||||||
assert(worker.store.isValidPath(i));
|
if (i != storePath) {
|
||||||
|
if (!worker.store.isValidPath(i)) {
|
||||||
|
throw Error("reference '%s' of path '%s' is not a valid path",
|
||||||
|
worker.store.printStorePath(i), worker.store.printStorePath(storePath));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
co_await yield();
|
co_await yield();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue