diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2020-03-30 17:13:30 +0200 |
---|---|---|
committer | Andreas Klebinger <klebinger.andreas@gmx.at> | 2020-03-31 10:58:32 -0400 |
commit | 4edffcbba6c4ff80b02a5e566a0622622baeaa1f (patch) | |
tree | 5a49cc38f4338099c270e4537e04ecaf39bc390f | |
parent | 4b9c586472bf99425f7bbcf346472d7c54f05028 (diff) | |
download | haskell-wip/andreask/tools_unlines.tar.gz |
Turn newlines into spaces for hadrian/ghci.wip/andreask/tools_unlines
The newlines break the command on windows.
-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 |