Skip to content

Commit 76d9f5d

Browse files
committed
fix(libstore/build/derivation-goal): don't assert on partially valid outputs
Fixes: #14130
1 parent 37c1ef5 commit 76d9f5d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libstore/build/derivation-goal.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,12 @@ Goal::Co DerivationGoal::haveDerivation(bool storeDerivation)
278278
}
279279
}
280280

281-
assert(success.builtOutputs.count(wantedOutput) > 0);
281+
/* If the wanted output is not in builtOutputs (e.g., because it
282+
was already valid and therefore not re-registered), we need to
283+
add it ourselves to ensure we return the correct information. */
284+
if (success.builtOutputs.count(wantedOutput) == 0) {
285+
success.builtOutputs = {{wantedOutput, assertPathValidity()}};
286+
}
282287
}
283288
}
284289

0 commit comments

Comments
 (0)