diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-02 16:44:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-02 16:44:04 -0400 |
commit | d1dd40c49bb95416adec5b33e4dc1e7672a2f7f7 (patch) | |
tree | d8d1eee5f21463bd87b0b502fa54e468f34e4f9f /Remote.hs | |
parent | cb5dacfd403a5ca4e3bdeb3eb3d0009136966f91 (diff) |
avoid showing json lists of remotes when not in json mode
Diffstat (limited to 'Remote.hs')
-rw-r--r-- | Remote.hs | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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 |