diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-12-06 14:24:44 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-12-06 14:24:44 -0400 |
| commit | 030f13f2d0501c9fb42c8f1efa0a15fa63c94d67 (patch) | |
| tree | f81cbf9524d258daea72ab09866a6a8fe526c827 /src/Propellor/Property/Cmd.hs | |
| parent | 94f91a44810dc3a1eca95c843e3c444cbbe87006 (diff) | |
allow using `check` on a UncheckedProperty, which yields a Property
Diffstat (limited to 'src/Propellor/Property/Cmd.hs')
| -rw-r--r-- | src/Propellor/Property/Cmd.hs | 5 |
1 files changed, 2 insertions, 3 deletions
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 |
