about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-14T13·27+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-14T16·29+0200
commit3908d3929ceb07cee5983fa647817f0e7aecbd97 (patch)
treedab9dff2f82f24a84126b4b4a6900fe953aa1b15 /src/libstore/store-api.hh
parent6438ba22af57edc054e441053a7c3cd5d48e5597 (diff)
nix path-info: Don't barf on invalid paths
Now you get

  [
    {
      "path": "/nix/store/fzvliz4j5xzvnd0w5zgw2l0ksqh578yk-bla",
      "valid": false
    }
  ]
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index cada37653e6f..586d35e84ffd 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -35,6 +35,7 @@ class JSONPlaceholder;
 enum RepairFlag : bool { NoRepair = false, Repair = true };
 enum CheckSigsFlag : bool { NoCheckSigs = false, CheckSigs = true };
 enum SubstituteFlag : bool { NoSubstitute = false, Substitute = true };
+enum AllowInvalidFlag : bool { DisallowInvalid = false, AllowInvalid = true };
 
 
 /* Size of the hash part of store paths, in base-32 characters. */
@@ -488,7 +489,8 @@ public:
        included. If ‘showClosureSize’ is true, the closure size of
        each path is included. */
     void pathInfoToJSON(JSONPlaceholder & jsonOut, const PathSet & storePaths,
-        bool includeImpureInfo, bool showClosureSize);
+        bool includeImpureInfo, bool showClosureSize,
+        AllowInvalidFlag allowInvalid = DisallowInvalid);
 
     /* Return the size of the closure of the specified path, that is,
        the sum of the size of the NAR serialisation of each path in