summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-02-14 12:40:40 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-02-14 12:40:40 -0400
commit90a8b38ac048d2a9a7caeb68d70d5148fb4148b8 (patch)
tree8095c25b6dbe1308151bd2fd20a88ef88e418cb2 /Command
parent33e03d58ae2a351b137ca8e32fa704d240e626e0 (diff)
set oneshot mode on a per-command basis
Avoids ugly (and test suite failing) hack in Command.Version
Diffstat (limited to 'Command')
-rw-r--r--Command/ConfigList.hs2
-rw-r--r--Command/DropKey.hs2
-rw-r--r--Command/InAnnex.hs2
-rw-r--r--Command/RecvKey.hs2
-rw-r--r--Command/SendKey.hs2
-rw-r--r--Command/Version.hs7
6 files changed, 7 insertions, 10 deletions
diff --git a/Command/ConfigList.hs b/Command/ConfigList.hs
index dcf4d1509..fc4ba9102 100644
--- a/Command/ConfigList.hs
+++ b/Command/ConfigList.hs
@@ -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]
diff --git a/Command/DropKey.hs b/Command/DropKey.hs
index aaaa22466..68fdbfdd9 100644
--- a/Command/DropKey.hs
+++ b/Command/DropKey.hs
@@ -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]
diff --git a/Command/InAnnex.hs b/Command/InAnnex.hs
index c41f9a92c..ad0a4d5c7 100644
--- a/Command/InAnnex.hs
+++ b/Command/InAnnex.hs
@@ -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]
diff --git a/Command/RecvKey.hs b/Command/RecvKey.hs
index a27a5efdf..9744a56d4 100644
--- a/Command/RecvKey.hs
+++ b/Command/RecvKey.hs
@@ -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]
diff --git a/Command/SendKey.hs b/Command/SendKey.hs
index 7b1cd3eca..686a31caa 100644
--- a/Command/SendKey.hs
+++ b/Command/SendKey.hs
@@ -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]
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 " "