diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2020-03-30 17:13:30 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-03 06:28:08 -0400 |
commit | 1b7e8a94cb3334fc0e513dec2db323f32c3a0713 (patch) | |
tree | dec3933ee7ea32bc7919bc8f241b090013eb01e4 /hadrian | |
parent | 9e60273db47364fc08aeb5a389caf67559e0d353 (diff) | |
download | haskell-1b7e8a94cb3334fc0e513dec2db323f32c3a0713.tar.gz |
Turn newlines into spaces for hadrian/ghci.
The newlines break the command on windows.
Diffstat (limited to 'hadrian')
-rwxr-xr-x | hadrian/ghci-cabal | 3 | ||||
-rwxr-xr-x | hadrian/ghci-stack | 3 |
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 |