fix format

This commit is contained in:
Jörg Thalheim 2023-12-10 15:44:15 +01:00 committed by mergify[bot]
parent a03f039a56
commit 3be8c48f54
2 changed files with 7 additions and 6 deletions

View file

@ -6,7 +6,6 @@
#include <nix/value-to-json.hh>
#include <nix/derivations.hh>
static bool queryIsCached(nix::Store &store,
std::map<std::string, std::string> &outputs) {
uint64_t downloadSize, narSize;
@ -23,7 +22,8 @@ static bool queryIsCached(nix::Store &store,
}
/* The fields of a derivation that are printed in json form */
Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo, MyArgs &args) {
Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo,
MyArgs &args) {
auto localStore = state.store.dynamic_pointer_cast<nix::LocalFSStore>();
@ -58,7 +58,8 @@ Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo, My
meta = meta_;
}
if (args.checkCacheStatus) {
cacheStatus = queryIsCached(*localStore, outputs) ? Drv::CacheStatus::Cached
cacheStatus = queryIsCached(*localStore, outputs)
? Drv::CacheStatus::Cached
: Drv::CacheStatus::Uncached;
} else {
cacheStatus = Drv::CacheStatus::Unknown;