refactor(readTree): Flip argument order of argFilter
Since the filters return 'args', this makes nesting of filters more readable. Change-Id: I775252460e3e077cc6db2fab6f3948414a95ecbf Reviewed-on: https://cl.tvl.fyi/c/depot/+/3873 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
dc8d3e869d
commit
ac41d89ba5
2 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ let
|
|||
# Create a readTree filter disallowing access to the specified
|
||||
# top-level folder in other parts of the depot, except for specific
|
||||
# exceptions specified by their (full) paths.
|
||||
restrictFolder = { folder, exceptions ? [], reason }: args: parts:
|
||||
restrictFolder = { folder, exceptions ? [], reason }: parts: args:
|
||||
if (elemAt parts 0) == folder || elem parts exceptions
|
||||
then args
|
||||
else args // {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue