summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildtool/common/artifact.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildtool/common/artifact.hpp b/src/buildtool/common/artifact.hpp
index a073b0d7..3a713659 100644
--- a/src/buildtool/common/artifact.hpp
+++ b/src/buildtool/common/artifact.hpp
@@ -32,10 +32,13 @@ class Artifact {
}
// Create string of the form '[hash:size:type]'
- [[nodiscard]] auto ToString() const noexcept -> std::string {
+ [[nodiscard]] auto ToString(bool size_unknown = false) const noexcept
+ -> std::string {
+ auto size_str =
+ size_unknown ? std::string{} : std::to_string(digest.size());
return fmt::format("[{}:{}:{}]{}",
digest.hash(),
- digest.size(),
+ size_str,
ToChar(type),
failed ? " FAILED" : "");
}