diff --git a/lix/libstore/store-api.hh b/lix/libstore/store-api.hh index c3a5a1d10..0ed598700 100644 --- a/lix/libstore/store-api.hh +++ b/lix/libstore/store-api.hh @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -927,11 +928,17 @@ protected: * \todo Using this should be a last resort. It is better to make * the method "virtual pure" and/or move it to a subclass. */ - [[noreturn]] void unsupported(const std::string & op) + [[noreturn]] + void + unsupported(const std::string & op, const std::optional info = std::nullopt) { - throw Unsupported("operation '%s' is not supported by store '%s'", op, getUri()); + throw Unsupported( + "operation '%s' is not supported by store '%s'%s", + op, + getUri(), + Uncolored(info ? fmt(". %s", *info) : "") + ); } - }; diff --git a/lix/libstore/uds-remote-store.hh b/lix/libstore/uds-remote-store.hh index 5f355a18a..a6cb74710 100644 --- a/lix/libstore/uds-remote-store.hh +++ b/lix/libstore/uds-remote-store.hh @@ -49,6 +49,16 @@ public: return LocalFSStore::narFromPath(path, context); } + kj::Promise> repairPath(const StorePath & path) override + try { + unsupported( + "repairPath", + HintFmt("This command must be run as %s with %s", "root", "--store local").str() + ); + } catch (...) { + return {result::current_exception()}; + } + /** * Implementation of `IndirectRootStore::addIndirectRoot()` which * delegates to the remote store.