diff options
Diffstat (limited to 'src/libstore/gc-store.cc')
-rw-r--r-- | src/libstore/gc-store.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libstore/gc-store.cc b/src/libstore/gc-store.cc new file mode 100644 index 000000000..3dbdec53b --- /dev/null +++ b/src/libstore/gc-store.cc @@ -0,0 +1,13 @@ +#include "gc-store.hh" + +namespace nix { + +GcStore & requireGcStore(Store & store) +{ + auto * gcStore = dynamic_cast<GcStore *>(&store); + if (!gcStore) + throw UsageError("Garbage collection not supported by this store"); + return *gcStore; +} + +} |