From 9ca332e48169ac19dad050a7f99e0db523d8d9c4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 7 Dec 2014 14:57:35 -0400 Subject: Fixed privdata introspection for User.hasPassword and User.hasSomePassword This is not a complete fix for the problem that Info doen't propigate from the called property when code does something like: do hostname <- asks hostName ensureProperty $ foo hostname Instead, I just eliminated the need to implement hasPassword that way, by making the PrivData Info use a HostContext which automatically gets the right hostname passed to it. All other uses of withPrivData don't have the problem. It's still possible for the user to run into the problem if they write something like the above, where foo is a property that uses privdata. However, all properties that take a Context now also accept a HostContext, so it's at least less likely the user needs to write that. --- src/Propellor.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Propellor.hs') diff --git a/src/Propellor.hs b/src/Propellor.hs index 6e31e27c..0e34e988 100644 --- a/src/Propellor.hs +++ b/src/Propellor.hs @@ -36,6 +36,7 @@ module Propellor ( , module Propellor.Host , module Propellor.Info , module Propellor.PrivData + , module Propellor.Types.PrivData , module Propellor.Engine , module Propellor.Exception , module Propellor.Message @@ -49,6 +50,7 @@ import Propellor.Property import Propellor.Engine import Propellor.Property.Cmd import Propellor.PrivData +import Propellor.Types.PrivData import Propellor.Message import Propellor.Exception import Propellor.Info -- cgit v1.2.3