From 9331a37b178c9142f5e864bbdc5434ea208946cc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Apr 2017 11:53:10 -0400 Subject: make url work without --debug --- Role/Developer.hs | 5 +++-- Role/User.hs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'Role') diff --git a/Role/Developer.hs b/Role/Developer.hs index 960a204..fc54c9f 100644 --- a/Role/Developer.hs +++ b/Role/Developer.hs @@ -35,14 +35,15 @@ import Data.Maybe import Control.Monad import Data.Monoid import Data.Time.Clock.POSIX +import Network.URI run :: DeveloperOpts -> IO () run = run' developer . debugUrl -run' :: (TMVar (TVar DeveloperState) -> TMChan (Message Entered) -> TMChan AnyMessage -> SessionID -> IO ()) -> UrlString -> IO () +run' :: (TMVar (TVar DeveloperState) -> TMChan (Message Entered) -> TMChan AnyMessage -> SessionID -> IO ()) -> URI -> IO () run' runner url = do app <- do - let connect = ConnectMode (T.pack url) + let connect = ConnectMode $ T.pack $ show url dsv <- newEmptyTMVarIO let recentactivity = developerStateRecentActivity dsv return $ clientApp connect recentactivity Developer Just $ diff --git a/Role/User.hs b/Role/User.hs index 0929f74..d11c235 100644 --- a/Role/User.hs +++ b/Role/User.hs @@ -42,7 +42,7 @@ run os = fromMaybe (ExitFailure 101) <$> connect let url = sessionIDUrl sid "localhost" 8081 putStrLn "" putStrLn "Others can connect to this session and help you debug by running:" - putStrLn $ " debug-me --debug " ++ url + putStrLn $ " debug-me " ++ show url hFlush stdout withSessionLogger sid $ go ochan ichan usv controlinput controloutput go ochan ichan usv controlinput controloutput logger = do @@ -74,7 +74,7 @@ developerMessages (User _) = Nothing shellCommand :: UserOpts -> IO (String, [String]) shellCommand os = case cmdToRun os of - Just v -> return v + Just v -> return (v, []) Nothing -> maybe ("bash", ["-l"]) (, []) <$> lookupEnv "SHELL" -- | Log of recent Activity, with the most recent first. -- cgit v1.2.3