set oneshot mode on a per-command basis
Avoids ugly (and test suite failing) hack in Command.Version
This commit is contained in:
parent
33e03d58ae
commit
90a8b38ac0
11 changed files with 19 additions and 16 deletions
|
@ -12,7 +12,7 @@ import Command
|
|||
import Annex.UUID
|
||||
|
||||
def :: [Command]
|
||||
def = [command "configlist" paramNothing seek
|
||||
def = [oneShot $ command "configlist" paramNothing seek
|
||||
"outputs relevant git configuration"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
|
|
|
@ -14,7 +14,7 @@ import Logs.Location
|
|||
import Annex.Content
|
||||
|
||||
def :: [Command]
|
||||
def = [command "dropkey" (paramRepeating paramKey) seek
|
||||
def = [oneShot $ command "dropkey" (paramRepeating paramKey) seek
|
||||
"drops annexed content for specified keys"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
|
|
|
@ -12,7 +12,7 @@ import Command
|
|||
import Annex.Content
|
||||
|
||||
def :: [Command]
|
||||
def = [command "inannex" (paramRepeating paramKey) seek
|
||||
def = [oneShot $ command "inannex" (paramRepeating paramKey) seek
|
||||
"checks if keys are present in the annex"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
|
|
|
@ -14,7 +14,7 @@ import Annex.Content
|
|||
import Utility.RsyncFile
|
||||
|
||||
def :: [Command]
|
||||
def = [command "recvkey" paramKey seek
|
||||
def = [oneShot $ command "recvkey" paramKey seek
|
||||
"runs rsync in server mode to receive content"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
|
|
|
@ -13,7 +13,7 @@ import Annex.Content
|
|||
import Utility.RsyncFile
|
||||
|
||||
def :: [Command]
|
||||
def = [command "sendkey" paramKey seek
|
||||
def = [oneShot $ command "sendkey" paramKey seek
|
||||
"runs rsync in server mode to send content"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
|
|
|
@ -11,10 +11,9 @@ import Common.Annex
|
|||
import Command
|
||||
import qualified Build.SysConfig as SysConfig
|
||||
import Annex.Version
|
||||
import CmdLine
|
||||
|
||||
def :: [Command]
|
||||
def = [noRepo showPackageVersion $ dontCheck repoExists $
|
||||
def = [oneShot $ noRepo showPackageVersion $ dontCheck repoExists $
|
||||
command "version" paramNothing seek "show version info"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
|
@ -29,9 +28,7 @@ start = do
|
|||
putStrLn $ "default repository version: " ++ defaultVersion
|
||||
putStrLn $ "supported repository versions: " ++ vs supportedVersions
|
||||
putStrLn $ "upgrade supported from repository versions: " ++ vs upgradableVersions
|
||||
-- avoid normal cleanup
|
||||
_ <- shutdown True
|
||||
liftIO exitSuccess
|
||||
stop
|
||||
where
|
||||
vs = join " "
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue