summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2019-01-18 02:26:43 -0400
committerJoey Hess2019-01-18 02:26:43 -0400
commitf3b72464d48de4f0875648f17e5b6aaa1befcd90 (patch)
tree7b2b0435ca1109c23364c7f310a883a44df00b06 /src
parentb9d9333e030ac59ea11d435b7e2e4758daff4b4a (diff)
avoid unnecessarily using withOS in the implementation of pickOS
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs
index cb2f01a8..54dd8908 100644
--- a/src/Propellor/Property.hs
+++ b/src/Propellor/Property.hs
@@ -303,7 +303,8 @@ pickOS a b = c `addChildren` [toChildProperty a, toChildProperty b]
where
-- This use of getSatisfy is safe, because both a and b
-- are added as children, so their info will propigate.
- c = withOS (getDesc a) $ \_ o ->
+ c = property (getDesc a) $ do
+ o <- getOS
if matching o a
then maybe (pure NoChange) id (getSatisfy a)
else if matching o b