refactoring: move 'argument' global into config object

This commit is contained in:
Andreas Rumpf 2018-04-24 11:58:18 +02:00
commit b503ca03f6
4 changed files with 8 additions and 11 deletions

View file

@ -42,7 +42,7 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string; config: ConfigRef) =
of cmdArgument:
if processArgument(pass, p, argsCount, config): break
if pass == passCmd2:
if optRun notin gGlobalOptions and arguments != "" and options.command.normalize != "run":
if optRun notin gGlobalOptions and config.arguments.len > 0 and options.command.normalize != "run":
rawMessage(errArgsNeedRunOption, [])
proc serve*(cache: IdentCache; action: proc (cache: IdentCache){.nimcall.}; config: ConfigRef) =