From 1d02d589c79781cc4b0bd82467edbdf64c40f34d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 8 Dec 2014 01:06:19 -0400 Subject: propellor spin --- src/Propellor/Property/Cmd.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/Propellor/Property/Cmd.hs') diff --git a/src/Propellor/Property/Cmd.hs b/src/Propellor/Property/Cmd.hs index 725f5757..d24b1a8a 100644 --- a/src/Propellor/Property/Cmd.hs +++ b/src/Propellor/Property/Cmd.hs @@ -13,7 +13,6 @@ import "mtl" Control.Monad.Reader import Propellor.Types import Propellor.Property -import Utility.Monad import Utility.SafeCommand import Utility.Env @@ -28,10 +27,7 @@ cmdProperty cmd params = cmdProperty' cmd params [] cmdProperty' :: String -> [String] -> [(String, String)] -> Property cmdProperty' cmd params env = property desc $ liftIO $ do env' <- addEntries env <$> getEnvironment - ifM (boolSystemEnv cmd (map Param params) (Just env')) - ( return MadeChange - , return FailedChange - ) + toResult <$> boolSystemEnv cmd (map Param params) (Just env') where desc = unwords $ cmd : params -- cgit v1.2.3