summaryrefslogtreecommitdiff
path: root/CmdLine.hs
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 /CmdLine.hs
parent33e03d58ae2a351b137ca8e32fa704d240e626e0 (diff)
set oneshot mode on a per-command basis
Avoids ugly (and test suite failing) hack in Command.Version
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index d2adb71bb..0bb345912 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -28,8 +28,8 @@ type Params = [String]
type Flags = [Annex ()]
{- Runs the passed command line. -}
-dispatch :: Bool -> Params -> [Command] -> [Option] -> String -> IO Git.Repo -> IO ()
-dispatch oneshot args cmds commonoptions header getgitrepo = do
+dispatch :: Params -> [Command] -> [Option] -> String -> IO Git.Repo -> IO ()
+dispatch args cmds commonoptions header getgitrepo = do
setupConsole
r <- E.try getgitrepo :: IO (Either E.SomeException Git.Repo)
case r of
@@ -39,7 +39,7 @@ dispatch oneshot args cmds commonoptions header getgitrepo = do
(actions, state') <- Annex.run state $ do
sequence_ flags
prepCommand cmd params
- tryRun state' cmd $ [startup] ++ actions ++ [shutdown oneshot]
+ tryRun state' cmd $ [startup] ++ actions ++ [shutdown $ cmdoneshot cmd]
where
(flags, cmd, params) = parseCmd args cmds commonoptions header