diff options
Diffstat (limited to 'compiler/cmdlinehelper.nim')
-rw-r--r-- | compiler/cmdlinehelper.nim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/cmdlinehelper.nim b/compiler/cmdlinehelper.nim index e1824316a..26320d9cd 100644 --- a/compiler/cmdlinehelper.nim +++ b/compiler/cmdlinehelper.nim @@ -13,6 +13,8 @@ import options, idents, nimconf, scriptconfig, extccomp, commands, msgs, lineinfos, modulegraphs, condsyms, os, pathutils +from strutils import normalize + type NimProg* = ref object suggestMode*: bool @@ -72,7 +74,11 @@ proc loadConfigsAndRunMainCommand*(self: NimProg, cache: IdentCache; conf: Confi runNimScriptIfExists(scriptFile) # 'nim foo.nims' means to just run the NimScript file and do nothing more: if fileExists(scriptFile) and scriptFile == conf.projectFull: - return false + if conf.command == "": + conf.command = "e" + return false + elif conf.command.normalize == "e": + return false else: if scriptFile != conf.projectFull: runNimScriptIfExists(scriptFile) |