diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-06-09 13:06:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-09 13:06:47 +0200 |
commit | 381a32981bd9d15da2b06f151c38f1a1229a8800 (patch) | |
tree | 34bd75c80a91042816d81e4028a5dc8957fd90d9 /src/nix/build.cc | |
parent | 0e18254aa81b9315c13d6ae736cb38666d19f122 (diff) | |
parent | 3c78920f7358957dba37a379e9d0b062dd3192e2 (diff) |
Merge branch 'master' into angerman/mac-fix-recursive-nix
Diffstat (limited to 'src/nix/build.cc')
-rw-r--r-- | src/nix/build.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc index 4e133e288..ad1842a4e 100644 --- a/src/nix/build.cc +++ b/src/nix/build.cc @@ -27,8 +27,10 @@ nlohmann::json builtPathsWithResultToJSON(const std::vector<BuiltPathWithResult> std::visit([&](const auto & t) { auto j = t.toJSON(store); if (b.result) { - j["startTime"] = b.result->startTime; - j["stopTime"] = b.result->stopTime; + if (b.result->startTime) + j["startTime"] = b.result->startTime; + if (b.result->stopTime) + j["stopTime"] = b.result->stopTime; if (b.result->cpuUser) j["cpuUser"] = ((double) b.result->cpuUser->count()) / 1000000; if (b.result->cpuSystem) @@ -131,7 +133,8 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile auto buildables = Installable::build( getEvalStore(), store, Realise::Outputs, - installables, buildMode); + installables, + repair ? bmRepair : buildMode); if (json) logger->cout("%s", builtPathsWithResultToJSON(buildables, store).dump()); |