summaryrefslogtreecommitdiff
path: root/doc/forum/use_withUmask_in_a_property/comment_2_edefd952bdb96c8a6a5d705170a05a77._comment
blob: a569d068a3774489f9ed07d83ab284d6dca9a6ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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.
"""]]