diff options
author | Araq <rumpf_a@web.de> | 2012-01-08 10:50:10 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-01-08 10:50:10 +0100 |
commit | f7c1bef7bbd5c8b710d064acc7a763f5047ee39a (patch) | |
tree | 8cd0c0db114d4b33da3e2a259bce7b09933ebb2e | |
parent | 2ae78c0cfbdcc1a77d6536f360e20c67083da0c7 (diff) | |
download | Nim-f7c1bef7bbd5c8b710d064acc7a763f5047ee39a.tar.gz |
bugfix: command line args are processed again after config files, so that --verbosity:3 works again
-rwxr-xr-x | compiler/nimrod.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/nimrod.nim b/compiler/nimrod.nim index b574d22b8..10e10e1ec 100755 --- a/compiler/nimrod.nim +++ b/compiler/nimrod.nim @@ -23,6 +23,7 @@ var proc ProcessCmdLine(pass: TCmdLinePass) = var p = parseopt.initOptParser() + var argsCount = 0 while true: parseopt.next(p) case p.kind @@ -38,17 +39,16 @@ proc ProcessCmdLine(pass: TCmdLinePass) = else: ProcessSwitch(p.key, p.val, pass, gCmdLineInfo) of cmdArgument: - if pass != passCmd1: break - if options.command == "": + if argsCount == 0: options.command = p.key else: - options.commandArgs.add p.key - - if options.gProjectName == "": + if pass == passCmd1: options.commandArgs.add p.key + if argsCount == 1: # support UNIX style filenames anywhere for portable build scripts: options.gProjectName = unixToNativePath(p.key) arguments = cmdLineRest(p) break + inc argsCount if pass == passCmd2: if optRun notin gGlobalOptions and arguments != "": |