From 030f13f2d0501c9fb42c8f1efa0a15fa63c94d67 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 6 Dec 2015 14:24:44 -0400 Subject: allow using `check` on a UncheckedProperty, which yields a Property --- src/Propellor/Property/Cmd.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Propellor/Property/Cmd.hs') diff --git a/src/Propellor/Property/Cmd.hs b/src/Propellor/Property/Cmd.hs index 3db00bc1..83414dcb 100644 --- a/src/Propellor/Property/Cmd.hs +++ b/src/Propellor/Property/Cmd.hs @@ -6,11 +6,10 @@ -- -- The best approach is to `check` a property, so that the command is only -- run when it needs to be. With this method, you avoid running the --- `cmdProperty` unnecessarily, and you know that whenever it runs, a --- change was made. +-- `cmdProperty` unnecessarily. -- -- > check (not <$> userExists "bob") --- > (cmdProperty "useradd" ["bob"] `assume` MadeChange) +-- > (cmdProperty "useradd" ["bob"]) -- -- Sometimes it's just as expensive to check a property as it would be to -- run the command that ensures the property. So you can let the command -- cgit v1.3-2-g0d8e