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:
parent
27047570b5
commit
9fff868e39
2 changed files with 13 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue