From 73c306258b6e0e82cc977a8a5ce3e21c32ea8942 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 6 Nov 2018 21:55:13 +0100 Subject: Nimscript: fixes #9246 [backport] --- compiler/nim.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/nim.nim') diff --git a/compiler/nim.nim b/compiler/nim.nim index 5f3347255..1c4dbd3be 100644 --- a/compiler/nim.nim +++ b/compiler/nim.nim @@ -54,7 +54,8 @@ proc processCmdLine(pass: TCmdLinePass, cmd: string; config: ConfigRef) = of cmdArgument: if processArgument(pass, p, argsCount, config): break if pass == passCmd2: - if optRun notin config.globalOptions and config.arguments.len > 0 and config.command.normalize != "run": + if {optRun, optWasNimscript} * config.globalOptions == {} and + config.arguments.len > 0 and config.command.normalize notin ["run", "e"]: rawMessage(config, errGenerated, errArgsNeedRunOption) proc handleCmdLine(cache: IdentCache; conf: ConfigRef) = -- cgit 1.4.1-2-gfad0