Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-remote: fix format string shenanigans #10325

Merged
merged 1 commit into from Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/build-remote/build-remote.cc
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/libutil/fmt.hh
Expand Up @@ -144,6 +144,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.
*/
Expand Down