summary refs log tree commit diff stats
path: root/compiler/nim.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-07-12 21:52:29 +0200
committerAraq <rumpf_a@web.de>2019-07-12 21:53:46 +0200
commitd55cc0888d1140e4bdac0beacba424f8e767da7c (patch)
treee5993993b9e525dbc87019b0f4496b8413ac152a /compiler/nim.nim
parent423e8cca91d06983fd0bd65419c00a6ae6da2d80 (diff)
downloadNim-d55cc0888d1140e4bdac0beacba424f8e767da7c.tar.gz
better run also considers the command line; fixes #11719 [feature]
Diffstat (limited to 'compiler/nim.nim')
-rw-r--r--compiler/nim.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/nim.nim b/compiler/nim.nim
index 1f8a55897..5fcf043b5 100644
--- a/compiler/nim.nim
+++ b/compiler/nim.nim
@@ -48,12 +48,20 @@ proc processCmdLine(pass: TCmdLinePass, cmd: string; config: ConfigRef) =
     case p.kind
     of cmdEnd: break
     of cmdLongOption, cmdShortOption:
+      config.commandLine.add " "
+      config.commandLine.add p.key
+      if p.val.len > 0:
+        config.commandLine.add ':'
+        config.commandLine.add p.val
+
       if p.key == " ":
         p.key = "-"
         if processArgument(pass, p, argsCount, config): break
       else:
         processSwitch(pass, p, config)
     of cmdArgument:
+      config.commandLine.add " "
+      config.commandLine.add p.key
       if processArgument(pass, p, argsCount, config): break
   if pass == passCmd2:
     if {optRun, optWasNimscript} * config.globalOptions == {} and