Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Server.hs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@ import Control.Monad (guard)
import Data.IORef (IORef, newIORef, readIORef, writeIORef)
import GHC.IO.Exception (IOErrorType(ResourceVanished))
import Network (PortID(UnixSocket), Socket, accept, listenOn, sClose)
import System.Directory (removeFile)
import System.Directory (removeFile, getCurrentDirectory)
import System.Exit (ExitCode(ExitSuccess))
import System.IO (Handle, hClose, hFlush, hGetLine, hPutStrLn)
import System.IO.Error (ioeGetErrorType, isDoesNotExistError)
Expand DownExpand Up@@ -72,8 +72,10 @@ getNextCommand currentClient sock = do
Just (SrvCommand cmd ghcOpts) -> do
return $ Just (cmd, ghcOpts)
Just SrvStatus -> do
cwd <- getCurrentDirectory
mapM_ (clientSend currentClient) $
[ ClientStdout "Server is running."
, ClientStdout ("Server CWD is " ++ cwd)
, ClientExit ExitSuccess
]
getNextCommand currentClient sock
Expand Down