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

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: