Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Log when a plugin trigger is not executable #93

Merged
merged 1 commit into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.