diff options
author | 2012-02-14 12:40:40 -0400 | |
---|---|---|
committer | 2012-02-14 12:40:40 -0400 | |
commit | 90a8b38ac048d2a9a7caeb68d70d5148fb4148b8 (patch) | |
tree | 8095c25b6dbe1308151bd2fd20a88ef88e418cb2 /Command/Version.hs | |
parent | 33e03d58ae2a351b137ca8e32fa704d240e626e0 (diff) |
set oneshot mode on a per-command basis
Avoids ugly (and test suite failing) hack in Command.Version
Diffstat (limited to 'Command/Version.hs')
-rw-r--r-- | Command/Version.hs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Command/Version.hs b/Command/Version.hs index 8761d2a2e..af08d3d70 100644 --- a/Command/Version.hs +++ b/Command/Version.hs @@ -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 " " |