diff options
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Assistant.hs | 4 | ||||
-rw-r--r-- | Command/WebApp.hs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Command/Assistant.hs b/Command/Assistant.hs index eb2a4a500..53f7e4baf 100644 --- a/Command/Assistant.hs +++ b/Command/Assistant.hs @@ -34,7 +34,7 @@ seek = [withFlag Command.Watch.stopOption $ \stopdaemon -> start :: Bool -> Bool -> Bool -> CommandStart start foreground stopdaemon autostart | autostart = do - liftIO $ autoStart + liftIO autoStart stop | otherwise = do ensureInitialized @@ -43,7 +43,7 @@ start foreground stopdaemon autostart {- Run outside a git repository. Check to see if any parameter is - --autostart and enter autostart mode. -} checkAutoStart :: IO () -checkAutoStart = ifM (any (== "--autostart") <$> getArgs) +checkAutoStart = ifM (elem "--autostart" <$> getArgs) ( autoStart , error "Not in a git repository." ) diff --git a/Command/WebApp.hs b/Command/WebApp.hs index 7360e1b0c..a7d00738f 100644 --- a/Command/WebApp.hs +++ b/Command/WebApp.hs @@ -39,13 +39,13 @@ seek = [withNothing start] start :: CommandStart start = notBareRepo $ do - ifM (isInitialized) ( go , liftIO startNoRepo ) + ifM isInitialized ( go , liftIO startNoRepo ) stop where go = do browser <- fromRepo webBrowser f <- liftIO . absPath =<< fromRepo gitAnnexHtmlShim - ifM (checkpid <&&> checkshim f) $ + ifM (checkpid <&&> checkshim f) ( liftIO $ openBrowser browser f , startDaemon True True $ Just $ const $ openBrowser browser @@ -116,7 +116,7 @@ firstRun = do startAssistant True id $ Just $ sendurlback v sendurlback v url _htmlshim = putMVar v url {- Set up the pid file in the new repo. -} - dummydaemonize = do + dummydaemonize = liftIO . lockPidFile =<< fromRepo gitAnnexPidFile openBrowser :: Maybe FilePath -> FilePath -> IO () |