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
|
@ -18,7 +18,7 @@ import qualified Remote
|
|||
import qualified Backend
|
||||
|
||||
def :: [Command]
|
||||
def = [noCommit $ noRepo showPackageVersion $ dontCheck repoExists $
|
||||
def = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $
|
||||
command "version" paramNothing seek SectionQuery "show version info"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
|
@ -37,6 +37,9 @@ start = do
|
|||
unwords upgradableVersions
|
||||
stop
|
||||
|
||||
startNoRepo :: CmdParams -> IO ()
|
||||
startNoRepo _ = showPackageVersion
|
||||
|
||||
showPackageVersion :: IO ()
|
||||
showPackageVersion = do
|
||||
info "git-annex version" SysConfig.packageversion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue