summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Cmd.hs
diff options
context:
space:
mode:
authorJoey Hess2014-12-08 01:06:19 -0400
committerJoey Hess2014-12-08 01:07:25 -0400
commit4e9b01a8a7005905ecec37d1cd6a11d3b27676b7 (patch)
tree13afcfd63dd6522990ac19a63cb51e1a689391ac /src/Propellor/Property/Cmd.hs
parent42a0c832483296fb111279fc3512a3dfd44f2089 (diff)
propellor spin
(cherry picked from commit 1d02d589c79781cc4b0bd82467edbdf64c40f34d)
Diffstat (limited to 'src/Propellor/Property/Cmd.hs')
-rw-r--r--src/Propellor/Property/Cmd.hs6
1 files changed, 1 insertions, 5 deletions
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