mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 05:56:03 +01:00
fix(libstore/build/derivation-goal): don't assert on partially valid outputs
Fixes: #14130
(cherry picked from commit 9eecee3d4e)
This commit is contained in:
parent
7358e50193
commit
795d7bb591
1 changed files with 10 additions and 2 deletions
|
|
@ -182,8 +182,16 @@ Goal::Co DerivationGoal::haveDerivation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buildResult.success())
|
if (buildResult.success()) {
|
||||||
assert(buildResult.builtOutputs.count(wantedOutput) > 0);
|
/* If the wanted output is not in builtOutputs (e.g., because it
|
||||||
|
was already valid and therefore not re-registered), we need to
|
||||||
|
add it ourselves to ensure we return the correct information. */
|
||||||
|
if (buildResult.builtOutputs.count(wantedOutput) == 0) {
|
||||||
|
debug(
|
||||||
|
"BUG! wanted output '%s' not in builtOutputs, working around by adding it manually", wantedOutput);
|
||||||
|
buildResult.builtOutputs = {{wantedOutput, assertPathValidity()}};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
co_return amDone(g->exitCode, g->ex);
|
co_return amDone(g->exitCode, g->ex);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue