You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the hook will call cmd with the 3 files, and there is no way to restrict this (since we would require $STAGED_FILES|of-type:php|in-dir with 2 directories
I imagine several solutions
easy one: allow multivalued in-dir filter (coma separated?), but can be very verbose when there are a lot of dirs
complex one: add a filter like matchFilesCondition that would pick all the files that have been matched by all the conditions applied on files (complicated because it creates a link between condition and command, and also because it should take boolean operator on conditions into account)
Side note: I could also split my hook into one command for each dir, but this increases a lot the time required to run the hook, and this is complicated when there are a lot of dirs involved.
The text was updated successfully, but these errors were encountered:
imagine the following hook:
and the following staged files:
foo/foo.php
bar/bar.php
baz/baz.php
the hook will call
cmd
with the 3 files, and there is no way to restrict this (since we would require$STAGED_FILES|of-type:php|in-dir
with 2 directoriesI imagine several solutions
in-dir
filter (coma separated?), but can be very verbose when there are a lot of dirsmatchFilesCondition
that would pick all the files that have been matched by all the conditions applied on files (complicated because it creates a link between condition and command, and also because it should take boolean operator on conditions into account)Side note: I could also split my hook into one command for each dir, but this increases a lot the time required to run the hook, and this is complicated when there are a lot of dirs involved.
The text was updated successfully, but these errors were encountered: