mirror of
https://github.com/NixOS/nix.git
synced 2025-12-15 05:21:03 +01:00
Merge pull request #14060 from obsidiansystems/build-result-variant
Use `std::variant` to enforce `BuildResult` invariants
This commit is contained in:
commit
d76dc2406f
29 changed files with 568 additions and 397 deletions
|
|
@ -34,8 +34,10 @@ int main(int argc, char ** argv)
|
|||
const auto results = store->buildPathsWithResults(paths, bmNormal, store);
|
||||
|
||||
for (const auto & result : results) {
|
||||
for (const auto & [outputName, realisation] : result.builtOutputs) {
|
||||
std::cout << store->printStorePath(realisation.outPath) << "\n";
|
||||
if (auto * successP = result.tryGetSuccess()) {
|
||||
for (const auto & [outputName, realisation] : successP->builtOutputs) {
|
||||
std::cout << store->printStorePath(realisation.outPath) << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue