diff --git a/src/Language/Haskell/GhciWrapper.hs b/src/Language/Haskell/GhciWrapper.hs index 5a9666f3..64e92f27 100644 --- a/src/Language/Haskell/GhciWrapper.hs +++ b/src/Language/Haskell/GhciWrapper.hs @@ -82,16 +82,19 @@ new startupFile Config{..} envDefaults args_ = do let mandatoryArgs :: [String] - mandatoryArgs = ["-fshow-loaded-modules"] + mandatoryArgs = ["-fshow-loaded-modules", "--interactive"] args :: [String] args = "-ghci-script" : startupFile : args_ ++ catMaybes [ if configIgnoreDotGhci then Just "-ignore-dot-ghci" else Nothing ] ++ mandatoryArgs + ghc :: String + ghc = fromMaybe "ghc" $ lookup "SENSEI_GHC" env + (stdoutReadEnd, stdoutWriteEnd) <- createPipe - (Just stdin_, Nothing, Nothing, processHandle ) <- createProcess (proc "ghci" args) { + (Just stdin_, Nothing, Nothing, processHandle ) <- createProcess (proc ghc args) { cwd = configWorkingDirectory , env = Just $ envDefaults ++ env , std_in = CreatePipe diff --git a/test/ClientSpec.hs b/test/ClientSpec.hs index 38dcfcd0..b413fce5 100644 --- a/test/ClientSpec.hs +++ b/test/ClientSpec.hs @@ -32,7 +32,7 @@ spec = do it "indicates failure" $ do withFailure $ \ dir -> do - client dir [] `shouldReturn` (False, "failure") + client dir ["--color"] `shouldReturn` (False, fromString $ withColor Red "failure") context "when server socket is missing" $ do it "reports error" $ do