diff options
Diffstat (limited to 'compiler/main.nim')
-rw-r--r-- | compiler/main.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index af9102414..f9b0dd413 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -260,7 +260,7 @@ proc mainCommand*(graph: ModuleGraph) = conf.setNoteDefaults(warnLockLevel, false) # issue #13218 conf.setNoteDefaults(warnRedefinitionOfLabel, false) # issue #13218 # because currently generates lots of false positives due to conflation - # of labels links in doc comments, eg for random.rand: + # of labels links in doc comments, e.g. for random.rand: # ## * `rand proc<#rand,Rand,Natural>`_ that returns an integer # ## * `rand proc<#rand,Rand,range[]>`_ that returns a float commandDoc2(graph, false) @@ -348,11 +348,12 @@ proc mainCommand*(graph: ModuleGraph) = conf.cmd = cmdInteractive commandInteractive(graph) of "e": - if not fileExists(conf.projectFull): + if conf.projectIsCmd or conf.projectIsStdin: discard + elif not fileExists(conf.projectFull): rawMessage(conf, errGenerated, "NimScript file does not exist: " & conf.projectFull.string) elif not conf.projectFull.string.endsWith(".nims"): rawMessage(conf, errGenerated, "not a NimScript file: " & conf.projectFull.string) - # main NimScript logic handled in cmdlinehelper.nim. + # main NimScript logic handled in `loadConfigs`. of "nop", "help": # prevent the "success" message: conf.cmd = cmdDump |