Warn the user if the specified verbosity level is wrong
This commit is contained in:
parent
890086baec
commit
589d6bc8d8
1 changed files with 4 additions and 1 deletions
|
|
@ -606,7 +606,10 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
|
||||||
incl(conf.globalOptions, optRun)
|
incl(conf.globalOptions, optRun)
|
||||||
of "verbosity":
|
of "verbosity":
|
||||||
expectArg(conf, switch, arg, pass, info)
|
expectArg(conf, switch, arg, pass, info)
|
||||||
conf.verbosity = parseInt(arg)
|
let verbosity = parseInt(arg)
|
||||||
|
if verbosity notin {0..3}:
|
||||||
|
localError(conf, info, "invalid verbosity level: '$1'" % arg)
|
||||||
|
conf.verbosity = verbosity
|
||||||
conf.notes = NotesVerbosity[conf.verbosity]
|
conf.notes = NotesVerbosity[conf.verbosity]
|
||||||
incl(conf.notes, conf.enableNotes)
|
incl(conf.notes, conf.enableNotes)
|
||||||
excl(conf.notes, conf.disableNotes)
|
excl(conf.notes, conf.disableNotes)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue