From bda9a461fe4e2041d03627b04fd807d9642274bc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Jun 2016 14:39:48 -0400 Subject: another approach --- ...mment_2_edefd952bdb96c8a6a5d705170a05a77._comment | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/forum/use_withUmask_in_a_property/comment_2_edefd952bdb96c8a6a5d705170a05a77._comment (limited to 'doc/forum') diff --git a/doc/forum/use_withUmask_in_a_property/comment_2_edefd952bdb96c8a6a5d705170a05a77._comment b/doc/forum/use_withUmask_in_a_property/comment_2_edefd952bdb96c8a6a5d705170a05a77._comment new file mode 100644 index 00000000..a569d068 --- /dev/null +++ b/doc/forum/use_withUmask_in_a_property/comment_2_edefd952bdb96c8a6a5d705170a05a77._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2016-06-20T18:36:07Z" + content=""" +Here's another, perhaps simpler way to do it. The `adjustPropertySatisfy` +function takes an existing Property and applies a function to the Propellor +action inside it. + + adjustPropertySatisfy :: Property metatypes -> (Propellor Result -> Propellor Result) -> Property metatypes + +So, given the `genrsa` Property from my example above, you could +modify its action to use withUmask: + + adjustPropertySatisfy genrsa (withUmask filemode) + +This is simpler, but less flexible since it causes the entire +Propellor action to be run with the specified umask, not just part of the +action. But it works well for your purpose I think. +"""]] -- cgit v1.2.3