bugfix: command line args are processed again after config files, so that --verbosity:3 works again
This commit is contained in:
parent
2ae78c0cfb
commit
f7c1bef7bb
1 changed files with 5 additions and 5 deletions
|
|
@ -23,6 +23,7 @@ var
|
||||||
|
|
||||||
proc ProcessCmdLine(pass: TCmdLinePass) =
|
proc ProcessCmdLine(pass: TCmdLinePass) =
|
||||||
var p = parseopt.initOptParser()
|
var p = parseopt.initOptParser()
|
||||||
|
var argsCount = 0
|
||||||
while true:
|
while true:
|
||||||
parseopt.next(p)
|
parseopt.next(p)
|
||||||
case p.kind
|
case p.kind
|
||||||
|
|
@ -38,17 +39,16 @@ proc ProcessCmdLine(pass: TCmdLinePass) =
|
||||||
else:
|
else:
|
||||||
ProcessSwitch(p.key, p.val, pass, gCmdLineInfo)
|
ProcessSwitch(p.key, p.val, pass, gCmdLineInfo)
|
||||||
of cmdArgument:
|
of cmdArgument:
|
||||||
if pass != passCmd1: break
|
if argsCount == 0:
|
||||||
if options.command == "":
|
|
||||||
options.command = p.key
|
options.command = p.key
|
||||||
else:
|
else:
|
||||||
options.commandArgs.add p.key
|
if pass == passCmd1: options.commandArgs.add p.key
|
||||||
|
if argsCount == 1:
|
||||||
if options.gProjectName == "":
|
|
||||||
# support UNIX style filenames anywhere for portable build scripts:
|
# support UNIX style filenames anywhere for portable build scripts:
|
||||||
options.gProjectName = unixToNativePath(p.key)
|
options.gProjectName = unixToNativePath(p.key)
|
||||||
arguments = cmdLineRest(p)
|
arguments = cmdLineRest(p)
|
||||||
break
|
break
|
||||||
|
inc argsCount
|
||||||
|
|
||||||
if pass == passCmd2:
|
if pass == passCmd2:
|
||||||
if optRun notin gGlobalOptions and arguments != "":
|
if optRun notin gGlobalOptions and arguments != "":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue