From f3b72464d48de4f0875648f17e5b6aaa1befcd90 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 18 Jan 2019 02:26:43 -0400 Subject: avoid unnecessarily using withOS in the implementation of pickOS --- src/Propellor/Property.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property.hs') 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 -- cgit v1.2.3