When ipc-tap calls per-topic hooks, it does not check if a hook was
set, causing an error to be emitted when no hook for a topic was set.
This commit modifies ipc-tap so that it checks if a hook is set before
executing it.
local message="$2"
local data
+ local hook
+
+ hook="${hooks[$topic]}"
- if data=$("${hooks[$topic]}" <<< "$message") &&
+ if [[ -n "$hook" ]] &&
+ data=$("$hook" <<< "$message") &&
[[ -n "$data" ]]; then
output_message "HookData" "$data"
fi