aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/build-remote/build-remote.cc2
-rw-r--r--src/libutil/fmt.hh4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index 04aade9db..e2ada70cd 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -202,7 +202,7 @@ static int main_build_remote(int argc, char * * argv)
else
drvstr = "<unknown>";
- auto error = HintFmt(errorText);
+ auto error = HintFmt::fromFormatString(errorText);
error
% drvstr
% neededSystem
diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh
index 75354a07c..84a3e3e11 100644
--- a/src/libutil/fmt.hh
+++ b/src/libutil/fmt.hh
@@ -141,6 +141,10 @@ public:
: HintFmt("%s", Uncolored(literal))
{ }
+ static HintFmt fromFormatString(const std::string & format) {
+ return HintFmt(boost::format(format));
+ }
+
/**
* Interpolate the given arguments into the format string.
*/