Skip to content

Commit

Permalink
Merge pull request #93 from dokku/53-executable-warning
Browse files Browse the repository at this point in the history
Log when a plugin trigger is not executable
  • Loading branch information
josegonzalez authored May 19, 2022
2 parents ba2f9d3 + 86a2347 commit f477c30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions bashenv/plugn.bash
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ trigger() {
declare hook="$1"; shift
shopt -s nullglob
for plugin in $PLUGIN_PATH/enabled/*; do
if [[ -x "$plugin/$hook" ]]; then
eval "$(config-export $(basename $plugin))"
$plugin/$hook "$@"
if [[ -f "$plugin/$hook" ]]; then
if [[ -x "$plugin/$hook" ]]; then
eval "$(config-export $(basename $plugin))"
$plugin/$hook "$@"
else
echo "Trigger '$hook' is not executable, skipping plugin ($(basename $plugin))" 1>&2
fi
fi
done
shopt -u nullglob
Expand Down
4 changes: 2 additions & 2 deletions bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f477c30

Please sign in to comment.