summaryrefslogtreecommitdiff
path: root/Remote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-02 16:44:04 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-02 16:44:04 -0400
commitd1dd40c49bb95416adec5b33e4dc1e7672a2f7f7 (patch)
treed8d1eee5f21463bd87b0b502fa54e468f34e4f9f /Remote.hs
parentcb5dacfd403a5ca4e3bdeb3eb3d0009136966f91 (diff)
avoid showing json lists of remotes when not in json mode
Diffstat (limited to 'Remote.hs')
-rw-r--r--Remote.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/Remote.hs b/Remote.hs
index ad1768da6..e54d2e233 100644
--- a/Remote.hs
+++ b/Remote.hs
@@ -30,7 +30,6 @@ module Remote (
) where
import Control.Monad (filterM)
-import Control.Monad.State (liftIO)
import Data.List
import qualified Data.Map as M
import Data.String.Utils
@@ -47,7 +46,6 @@ import Config
import Trust
import LocationLog
import Messages
-import qualified Utility.JSONStream
import RemoteLog
import qualified Remote.Git
@@ -134,8 +132,7 @@ prettyPrintUUIDs :: String -> [UUID] -> Annex String
prettyPrintUUIDs desc uuids = do
here <- getUUID =<< Annex.gitRepo
m <- M.union <$> uuidMap <*> availMap
- liftIO . putStr $ Utility.JSONStream.add
- [(desc, map (jsonify m here) uuids)]
+ maybeShowJSON [(desc, map (jsonify m here) uuids)]
return $ unwords $ map (\u -> "\t" ++ prettify m here u ++ "\n") uuids
where
availMap = M.fromList . map (\r -> (uuid r, name r)) <$> genList