summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2019-03-20 14:12:53 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2019-03-20 14:12:53 +0000
commit8f37f3732e5d538449cbca748d6672f517b3c5a7 (patch)
treed45363bb8b04f7fd039768a873b3ce620eabdb6d
parentc7a84a6067311c204f6fa459e5f59b0958863118 (diff)
downloadhaskell-wip/ghc-in-ghci-qol.tar.gz
Refactor ./hadrian/ghci.sh for better error messageswip/ghc-in-ghci-qol
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