diff options
Diffstat (limited to 'src/libstore/log-store.hh')
-rw-r--r-- | src/libstore/log-store.hh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstore/log-store.hh b/src/libstore/log-store.hh index ff1b92e17..b807e3e71 100644 --- a/src/libstore/log-store.hh +++ b/src/libstore/log-store.hh @@ -11,7 +11,14 @@ struct LogStore : public virtual Store /* Return the build log of the specified store path, if available, or null otherwise. */ - virtual std::optional<std::string> getBuildLog(const StorePath & path) = 0; + std::optional<std::string> getBuildLog(const StorePath & path) { + auto maybePath = getBuildDerivationPath(path); + if (!maybePath) + return std::nullopt; + return getBuildLogExact(maybePath.value()); + } + + virtual std::optional<std::string> getBuildLogExact(const StorePath & path) = 0; virtual void addBuildLog(const StorePath & path, std::string_view log) = 0; |