-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run custom hooks in entrypoint for non empty directories #2094
Comments
Looks like a good catch, though I don't have time to look too closely this morning. Feel up for submitting a PR that adjusts the Cc: @dvaerum |
So when I wrote this #1964, I originally had based it on using I had some back and forth with @J0WI and I think in all of that I forgot that using I don't really believe that I have found a better way than |
@dvaerum why we don't want to include sub-folders? |
Seem it was @J0WI preference #1964 (comment), and I didn't have a preference either way. However, here I should have realised my mistake about switching away from but instead of continuing down the path of not using |
I have tried to redeem my mistake with #2095 😉 |
It looks really good! Still I don't understood why |
I guess that one could make an environment variable, which defaults to 1 but is otherwise possible to overwrite, some like |
I don't think that it's worth to add an extra variable for |
Fixed in #2095 |
Hi all!
You allow to run custom script via hooks here.
First you're looking for any files in hook directory:
Then you iterate over *.sh files:
The problem is when hook directory contains some file(s) which don't have *.sh extension.
if
condition pass butfor
loop will give an one empty file and this will create an issue:Here is my little hack to omit this. Create empty.sh file.
I think you should change
ls -A ${hook_folder_path}
withfind ${hook_folder_path} -name "*.sh"
The text was updated successfully, but these errors were encountered: