From d55cc0888d1140e4bdac0beacba424f8e767da7c Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 12 Jul 2019 21:52:29 +0200 Subject: better run also considers the command line; fixes #11719 [feature] --- compiler/nim.nim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'compiler/nim.nim') 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 -- cgit 1.4.1-2-gfad0