mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 20:52:51 +00:00
564c235e32
A RETURN trap is not scoped to the function that installs it. perform_update left its trap referencing function-local installer_tmp/signature_tmp (and service_name/service_was_active) installed, so it re-ran when a later function returned. With those locals gone and 'set -u' active, the updater aborted with 'installer_tmp: unbound variable' immediately after logging 'Auto-update check completed' — pulse-update.service entered failed state even though the update had succeeded (reported #2128, affects v6.3.2/v6.4.1). Disarm the trap with 'trap - RETURN' on its first invocation, and use ${installer_tmp:-}/${signature_tmp:-} so a stray invocation cannot abort the script. Add a regression test asserting no RETURN trap remains after both the successful and the prerelease-refusal paths. Change-source: pulse-maintainer