File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,23 @@ Goal::Co DerivationGoal::haveDerivation()
182182 }
183183 }
184184
185- assert (success.builtOutputs .count (wantedOutput) > 0 );
185+ /* If the wanted output is not in builtOutputs (e.g., because it
186+ was already valid and therefore not re-registered), we need to
187+ add it ourselves to ensure we return the correct information. */
188+ if (success.builtOutputs .count (wantedOutput) == 0 ) {
189+ debug (
190+ " BUG! wanted output '%s' not in builtOutputs, working around by adding it manually" , wantedOutput);
191+ success.builtOutputs = {{
192+ wantedOutput,
193+ {
194+ assertPathValidity (),
195+ {
196+ .drvHash = outputHash,
197+ .outputName = wantedOutput,
198+ },
199+ },
200+ }};
201+ }
186202 }
187203 }
188204
You can’t perform that action at this time.
0 commit comments