When we introduced the environment hook error trap in #1179, we set it to propagate into all source-d plugin environment hooks. Unfortunately, this breaks the retry function in the ECR plugin's environment hook (which runs a command and then checks the exit code to determine whether to retry) by interrupting execution before the exit code can be checked.
When we introduced the
environment
hook error trap in #1179, we set it to propagate into allsource
-d plugin environment hooks. Unfortunately, this breaks theretry
function in the ECR plugin's environment hook (which runs a command and then checks the exit code to determine whether to retry) by interrupting execution before the exit code can be checked.Repro: https://github.com/buildkite-plugins/ecr-buildkite-plugin/pull/101
Fix by temporarily unsetting
-E
, stopping propagation of the trap command into the plugin environment hook.