From f7c1bef7bbd5c8b710d064acc7a763f5047ee39a Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 8 Jan 2012 10:50:10 +0100 Subject: [PATCH] bugfix: command line args are processed again after config files, so that --verbosity:3 works again --- compiler/nimrod.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/nimrod.nim b/compiler/nimrod.nim index b574d22b85..10e10e1ec8 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 != "":