diff options
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r-- | src/libstore/store-api.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 509b0fa68..ed3566f5e 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -22,6 +22,14 @@ using json = nlohmann::json; namespace nix { +BuildMode buildModeFromInteger(int raw) { + switch (raw) { + case bmNormal: return bmNormal; + case bmRepair: return bmRepair; + case bmCheck: return bmCheck; + default: throw Error("Invalid BuildMode"); + } +} bool Store::isInStore(PathView path) const { |