diff options
-rw-r--r-- | Command/WebApp.hs | 14 | ||||
-rw-r--r-- | Logs/Group.hs | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Command/WebApp.hs b/Command/WebApp.hs index 7ad6566c9..702506d34 100644 --- a/Command/WebApp.hs +++ b/Command/WebApp.hs @@ -39,9 +39,12 @@ seek :: [CommandSeek] seek = [withNothing start] start :: CommandStart -start = notBareRepo $ do +start = start' True + +start' :: Bool -> CommandStart +start' allowauto = notBareRepo $ do liftIO $ ensureInstalled - ifM isInitialized ( go , liftIO startNoRepo ) + ifM isInitialized ( go , auto ) stop where go = do @@ -52,6 +55,11 @@ start = notBareRepo $ do , startDaemon True True $ Just $ const $ openBrowser browser ) + auto + | allowauto = liftIO startNoRepo + | otherwise = do + d <- liftIO getCurrentDirectory + error $ "no repository for " ++ d checkpid = do pidfile <- fromRepo gitAnnexPidFile liftIO $ isJust <$> checkDaemon pidfile @@ -74,7 +82,7 @@ autoStart autostartfile = do (d:_) -> do changeWorkingDirectory d state <- Annex.new =<< Git.CurrentRepo.get - void $ Annex.eval state $ doCommand start + void $ Annex.eval state $ doCommand $ start' False {- Run the webapp without a repository, which prompts the user, makes one, - changes to it, starts the regular assistant, and redirects the diff --git a/Logs/Group.hs b/Logs/Group.hs index 56363f857..9fd748650 100644 --- a/Logs/Group.hs +++ b/Logs/Group.hs @@ -10,7 +10,7 @@ module Logs.Group ( groupSet, lookupGroups, groupMap, - getStandardGroup + getStandardGroup, ) where import qualified Data.Map as M |