Ensure exit codes propagate properly during upgrades