mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Merge pull request #12768 from Mic92/improve-error-messages
substitution-goal: convert assert into an Error
This commit is contained in:
commit
f1197f7601
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)
|
||||
if (i != storePath) /* ignore self-references */
|
||||
assert(worker.store.isValidPath(i));
|
||||
/* ignore self-references */
|
||||
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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue