summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2019-03-20 14:12:53 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-03-25 14:02:27 -0400
commit8e07368faf5090a5ac803f0e4fa3a5a2a4aba05c (patch)
tree138de8fe28fedc0c6e6ec7e0de0cf20b64f71e84
parent200d65ef41efda8ff2b524f7a15c14620d6a57b9 (diff)
downloadhaskell-8e07368faf5090a5ac803f0e4fa3a5a2a4aba05c.tar.gz
Refactor ./hadrian/ghci.sh for better error messages
By separating these two lines, if the first command fails then `ghci` is not loaded. Before it would still load ghci but display lots of errors about not being able to find modules.
-rwxr-xr-xhadrian/ghci.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/hadrian/ghci.sh b/hadrian/ghci.sh
index 4a70946269..4c9b9c6710 100755
--- a/hadrian/ghci.sh
+++ b/hadrian/ghci.sh
@@ -1,3 +1,6 @@
#!/usr/bin/env bash
-ghci $(TERM=dumb CABFLAGS=-v0 . "hadrian/build.cabal.sh" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@") -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs
+set -e
+
+GHC_FLAGS=$(TERM=dumb CABFLAGS=-v0 . "hadrian/build.cabal.sh" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")
+ghci $GHC_FLAGS -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs