summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Aiccu.hs
diff options
context:
space:
mode:
authorJoey Hess2019-07-02 00:46:21 -0400
committerJoey Hess2019-07-02 00:46:21 -0400
commit2ba2cda972f484771b763603bf09d555003861b7 (patch)
tree13c79ae8e9f46cf6c9ec5353ca366555da0e0ab1 /src/Propellor/Property/Aiccu.hs
parent7ac0fbfa247ca153a6187c47dde9fc3a94c9cdb5 (diff)
Revert "Revert "custom type error messages""
This reverts commit 665ea0d3d9e1b0e90278fd659dee0ef8642030da.
Diffstat (limited to 'src/Propellor/Property/Aiccu.hs')
-rw-r--r--src/Propellor/Property/Aiccu.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Propellor/Property/Aiccu.hs b/src/Propellor/Property/Aiccu.hs
index 1b28759c..8bf3f283 100644
--- a/src/Propellor/Property/Aiccu.hs
+++ b/src/Propellor/Property/Aiccu.hs
@@ -47,8 +47,7 @@ hasConfig :: TunnelId -> UserName -> Property (HasInfo + DebianLike)
hasConfig t u = prop `onChange` restarted
where
prop :: Property (HasInfo + UnixLike)
- prop = withSomePrivData [(Password (u++"/"++t)), (Password u)] (Context "aiccu") $
- property' "aiccu configured" . writeConfig
- writeConfig getpassword w = getpassword $ ensureProperty w . go
+ prop = withSomePrivData [(Password (u++"/"++t)), (Password u)] (Context "aiccu") $ \getpassword ->
+ property' "aiccu configured" $ \w -> getpassword $ ensureProperty w . go
go (Password u', p) = confPath `File.hasContentProtected` config u' t p
go (f, _) = error $ "Unexpected type of privdata: " ++ show f