summaryrefslogtreecommitdiff
path: root/Config.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Config.hs b/Config.hs
index 12f648047..b4f4c0b92 100644
--- a/Config.hs
+++ b/Config.hs
@@ -9,7 +9,7 @@ module Config where
import Data.Maybe
import Control.Monad.State (liftIO)
-import Control.Monad (liftM)
+import Control.Applicative
import System.Cmd.Utils
import qualified Git
@@ -47,8 +47,8 @@ remoteConfig r key = "remote." ++ fromMaybe "" (Git.repoRemoteName r) ++ ".annex
remoteCost :: Git.Repo -> Int -> Annex Int
remoteCost r def = do
cmd <- getConfig r "cost-command" ""
- return . safeparse =<< if not $ null cmd
- then liftM snd $ liftIO $ pipeFrom "sh" ["-c", cmd]
+ safeparse <$> if not $ null cmd
+ then liftIO $ snd <$> pipeFrom "sh" ["-c", cmd]
else getConfig r "cost" ""
where
safeparse v