diff options
author | Matthew Kenigsberg <matthewkenigsberg@gmail.com> | 2023-02-28 16:04:17 -0700 |
---|---|---|
committer | Matthew Kenigsberg <matthewkenigsberg@gmail.com> | 2023-02-28 16:04:41 -0700 |
commit | f86f2b973f3b07134736fd96c1eff1da184dc1af (patch) | |
tree | f0bcae54cef6e5ba677ade1005ba174f84fe50a6 /src/libstore/store-api.cc | |
parent | d5af43cb420fd5228c6e07a62fc53fcadb626aa3 (diff) |
Always set valid in path-info --json output
Currently the valid key is only present when the path is invalid, which
makes checking path validity more complex than it should be. With this
change, the valid key can always be used to check if a path is valid
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r-- | src/libstore/store-api.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 601efa1cc..f32c2d30c 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -855,6 +855,7 @@ json Store::pathInfoToJSON(const StorePathSet & storePaths, auto info = queryPathInfo(storePath); jsonPath["path"] = printStorePath(info->path); + jsonPath["valid"] = true; jsonPath["narHash"] = info->narHash.to_string(hashBase, true); jsonPath["narSize"] = info->narSize; |