diff options
authorJoey Hess2016-06-20 14:39:48 -0400
committerJoey Hess2016-06-20 14:39:48 -0400
commitbda9a461fe4e2041d03627b04fd807d9642274bc (patch)
parent89a2bb07a11829070f3fd20a90cf1be5901ec878 (diff)
another approach
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.