1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 08:11:47 +02:00

libutil: Add missing format arguments to UsageError ctor

Once again found by an automated migration to `std::format`.
I've tested that boost::format works fine with `std::string_view`
arguments.
This commit is contained in:
Sergei Zimmerman 2025-04-25 13:35:16 +03:00
parent 27047570b5
commit 9fff868e39
No known key found for this signature in database
GPG key ID: A9B0B557CA632325
2 changed files with 13 additions and 6 deletions

View file

@ -22,7 +22,7 @@ FileSerialisationMethod parseFileSerialisationMethod(std::string_view input)
if (ret)
return *ret;
else
throw UsageError("Unknown file serialiation method '%s', expect `flat` or `nar`");
throw UsageError("Unknown file serialiation method '%s', expect `flat` or `nar`", input);
}
@ -35,7 +35,7 @@ FileIngestionMethod parseFileIngestionMethod(std::string_view input)
if (ret)
return static_cast<FileIngestionMethod>(*ret);
else
throw UsageError("Unknown file ingestion method '%s', expect `flat`, `nar`, or `git`");
throw UsageError("Unknown file ingestion method '%s', expect `flat`, `nar`, or `git`", input);
}
}