diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-06-20 14:39:48 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-06-20 14:39:48 -0400 |
commit | bda9a461fe4e2041d03627b04fd807d9642274bc (patch) | |
tree | 9f5dd17b7156c3c4359496e20c799dd8a31d7376 | |
parent | 89a2bb07a11829070f3fd20a90cf1be5901ec878 (diff) |
another approach
-rw-r--r-- | doc/forum/use_withUmask_in_a_property/comment_2_edefd952bdb96c8a6a5d705170a05a77._comment | 20 |
1 files changed, 20 insertions, 0 deletions
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. +"""]] |