mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 00:02:25 +00:00
Merge pull request #11853 from xokdvium/dev/fix-verbosity-overflow-and-make-verbosity-strong-type
fix(libmain/common-args): do not exceed maximum allowed verbosity
This commit is contained in:
commit
cb7c7af95d
@ -17,7 +17,9 @@ MixCommonArgs::MixCommonArgs(const std::string & programName)
|
||||
.shortName = 'v',
|
||||
.description = "Increase the logging verbosity level.",
|
||||
.category = loggingCategory,
|
||||
.handler = {[]() { verbosity = (Verbosity) (verbosity + 1); }},
|
||||
.handler = {[]() {
|
||||
verbosity = (Verbosity) std::min<std::underlying_type_t<Verbosity>>(verbosity + 1, lvlVomit);
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
|
Loading…
Reference in New Issue
Block a user