Skip to content

Commit 381c1aa

Browse files
committed
Merge pull request #1 from ulidtko/master
add CWD in server status output
2 parents cd380a7 + 1b9557a commit 381c1aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Server.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Control.Monad (guard)
1212
import Data.IORef (IORef, newIORef, readIORef, writeIORef)
1313
import GHC.IO.Exception (IOErrorType(ResourceVanished))
1414
import Network (Socket, accept, listenOn, sClose)
15-
import System.Directory (removeFile)
15+
import System.Directory (removeFile, getCurrentDirectory)
1616
import System.Exit (ExitCode(ExitSuccess))
1717
import System.IO (Handle, hClose, hFlush, hGetLine, hPutStrLn)
1818
import System.IO.Error (ioeGetErrorType, isDoesNotExistError)
@@ -75,8 +75,10 @@ getNextCommand currentClient sock = do
7575
Just (SrvCommand cmd ghcOpts) -> do
7676
return $ Just (cmd, ghcOpts)
7777
Just SrvStatus -> do
78+
cwd <- getCurrentDirectory
7879
mapM_ (clientSend currentClient) $
7980
[ ClientStdout "Server is running."
81+
, ClientStdout ("Server CWD is " ++ cwd)
8082
, ClientExit ExitSuccess
8183
]
8284
getNextCommand currentClient sock

0 commit comments

Comments
 (0)