summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2022-11-12 13:12:28 +0100
committerGitHub <noreply@github.com>2022-11-12 13:12:28 +0100
commit852cf596ede370994f3f1bb49493ec96aa0653f3 (patch)
treebc57c94e3c1aee2a07b02f1a414b6eca975705fb
parentc75e6f35838c648c921731040469fe65252865e7 (diff)
downloadNim-852cf596ede370994f3f1bb49493ec96aa0653f3.tar.gz
fixes a strange issue most likely caused by a git merge (#20822)
-rw-r--r--compiler/scriptconfig.nim6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/scriptconfig.nim b/compiler/scriptconfig.nim
index adc228d1e..009e90fd5 100644
--- a/compiler/scriptconfig.nim
+++ b/compiler/scriptconfig.nim
@@ -181,15 +181,13 @@ proc setupVM*(module: PSym; cache: IdentCache; scriptName: string;
     options.cppDefine(conf, a.getString(0))
   cbexc stdinReadLine, EOFError:
     if defined(nimsuggest) or graph.config.cmd == cmdCheck:
-      discard
-    else:
       setResult(a, "")
+    else:
       setResult(a, stdin.readLine())
   cbexc stdinReadAll, EOFError:
     if defined(nimsuggest) or graph.config.cmd == cmdCheck:
-      discard
-    else:
       setResult(a, "")
+    else:
       setResult(a, stdin.readAll())
 
 proc runNimScript*(cache: IdentCache; scriptName: AbsoluteFile;