fix: scope deploy output redirect to git-hook only

The previous condition used a bash regex `git-*` that matched git-receive-pack and git-upload-pack, interposing a tee chain on the binary git wire protocol and producing `fatal: protocol error: bad line length character: !` on every push. Restrict the redirect to the pre-receive hook, where tee passthrough is safe because git-receive-pack forwards hook output via the protocol sideband.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-29 22:48:49 -04:00
parent aa72794711
commit 3b3bc3dd39

2
dokku
View File

@@ -188,7 +188,7 @@ execute_dokku_cmd() {
set -- "$PLUGIN_CMD" "$@"
fi
if [[ $PLUGIN_NAME =~ git-* ]] || [[ "$PLUGIN_NAME" == "ps:rebuild" ]] || [[ "$PLUGIN_NAME" == "ps:restart" ]] || [[ "$PLUGIN_NAME" == "deploy" ]]; then
if [[ "$PLUGIN_NAME" == "git-hook" ]] || [[ "$PLUGIN_NAME" == "ps:rebuild" ]] || [[ "$PLUGIN_NAME" == "ps:restart" ]] || [[ "$PLUGIN_NAME" == "deploy" ]]; then
export DOKKU_REDIRECT_OUTPUT=true
exec &> >(tee >(tee | logger -i -t "dokku-${DOKKU_PID}"))
fi