diff options
author | Araq <rumpf_a@web.de> | 2011-11-30 19:51:51 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-11-30 19:51:51 +0100 |
commit | ab5621a62bc670c0d1647df6322f70f26f054e8e (patch) | |
tree | b6f42b73ee1fd9e6ff69dedb2a839af0da9e4332 /compiler/nimrod.nim | |
parent | 7d2466638e5170946e862f0beaddcece93c05fe7 (diff) | |
download | Nim-ab5621a62bc670c0d1647df6322f70f26f054e8e.tar.gz |
bugfix: don't process arguments that are to be passed to the produced exe
Diffstat (limited to 'compiler/nimrod.nim')
-rwxr-xr-x | compiler/nimrod.nim | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/compiler/nimrod.nim b/compiler/nimrod.nim index 97e017e4f..6a9ae690e 100755 --- a/compiler/nimrod.nim +++ b/compiler/nimrod.nim @@ -37,17 +37,18 @@ proc ProcessCmdLine(pass: TCmdLinePass) = ProcessSwitch(key, val, pass, gCmdLineInfo) else: ProcessSwitch(p.key, p.val, pass, gCmdLineInfo) - of cmdArgument: - if pass == passCmd1: - if options.command == "": - options.command = p.key - else: - options.commandArgs.add p.key + of cmdArgument: + if pass != passCmd1: break + if options.command == "": + options.command = p.key + else: + options.commandArgs.add p.key - if options.gProjectName == "": - # support UNIX style filenames anywhere for portable build scripts: - options.gProjectName = unixToNativePath(p.key) - arguments = cmdLineRest(p) + if options.gProjectName == "": + # support UNIX style filenames anywhere for portable build scripts: + options.gProjectName = unixToNativePath(p.key) + arguments = cmdLineRest(p) + break if pass == passCmd2: if optRun notin gGlobalOptions and arguments != "": |