make "git annex help options" work outside a git repo
Option parsing for commands that run outside git repos is still screwy, as there is no Annex monad and so the flags cannot be passed in. But, any remaining parameters can be, which is enough for this fix.
This commit is contained in:
parent
6edac746f0
commit
fa3045aa8b
9 changed files with 31 additions and 24 deletions
|
@ -82,7 +82,7 @@ start' allowauto listenhost = do
|
|||
else openBrowser browser htmlshim url origout origerr
|
||||
)
|
||||
auto
|
||||
| allowauto = liftIO startNoRepo
|
||||
| allowauto = liftIO $ startNoRepo []
|
||||
| otherwise = do
|
||||
d <- liftIO getCurrentDirectory
|
||||
error $ "no git repository in " ++ d
|
||||
|
@ -93,8 +93,8 @@ start' allowauto listenhost = do
|
|||
|
||||
{- When run without a repo, start the first available listed repository in
|
||||
- the autostart file. If not, it's our first time being run! -}
|
||||
startNoRepo :: IO ()
|
||||
startNoRepo = do
|
||||
startNoRepo :: CmdParams -> IO ()
|
||||
startNoRepo _ = do
|
||||
-- FIXME should be able to reuse regular getopt, but
|
||||
-- it currently runs in the Annex monad.
|
||||
args <- getArgs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue