Merge pull request #10325 from K900/ooformatting

build-remote: fix format string shenanigans
This commit is contained in:
Théophane Hufschmitt 2024-03-26 11:45:32 +01:00 committed by GitHub
commit 0bf01917ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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.
*/