summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-03-30 17:13:30 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-04-03 06:28:08 -0400
commit1b7e8a94cb3334fc0e513dec2db323f32c3a0713 (patch)
treedec3933ee7ea32bc7919bc8f241b090013eb01e4
parent9e60273db47364fc08aeb5a389caf67559e0d353 (diff)
downloadhaskell-1b7e8a94cb3334fc0e513dec2db323f32c3a0713.tar.gz
Turn newlines into spaces for hadrian/ghci.
The newlines break the command on windows.
-rwxr-xr-xhadrian/ghci-cabal3
-rwxr-xr-xhadrian/ghci-stack3
2 files changed, 4 insertions, 2 deletions
diff --git a/hadrian/ghci-cabal b/hadrian/ghci-cabal
index 93343e4e28..2ee70427c3 100755
--- a/hadrian/ghci-cabal
+++ b/hadrian/ghci-cabal
@@ -2,5 +2,6 @@
set -e
-GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")"
+# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
+GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@" | tr '\n\r' ' ')"
ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m
diff --git a/hadrian/ghci-stack b/hadrian/ghci-stack
index 3c850cdac8..92b5229328 100755
--- a/hadrian/ghci-stack
+++ b/hadrian/ghci-stack
@@ -2,5 +2,6 @@
set -e
-GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-stack" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")"
+# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
+GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-stack" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@" | tr '\n\r' ' ')"
stack exec -- ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m