refactor: `--style` must be defined

This commit is contained in:
Daylin Morgan 2023-09-13 01:37:09 -05:00
parent f4594287d1
commit 67e00968fb
Signed by: daylin
GPG Key ID: C1E52E7DD81DF79F
1 changed files with 6 additions and 4 deletions

View File

@ -179,12 +179,14 @@ flags:
case key:
of "help", "h": writeHelp()
of "version", "v": writeVersion()
of "style", "s": style = val
of "style", "s":
if val == "":
echo "[red]ERROR[/]: expected value for -s/--style".bb
quit(QuitFailure)
style = val
of "debug": showDebug = true
else:
echo bb"[red]ERROR[/]: unexpected option/value -> ", key, ", ", val
echo "Option and value: ", key, ", ", val
echo bb"[yellow]warning[/]: unexpected option/value -> ", key, ", ", val
of cmdArgument:
strArgs.add key
if strArgs.len == 0: