File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -711,7 +711,7 @@ cleanup_continuation_launch_transport() {
711711}
712712
713713spawn_abort_cleanup () {
714- local status=$? endpoint_state endpoint_gone=1 account_clean=1 worktree_clean=1 rollback_lock=' ' rollback_tmp restored_existing_meta=0 artifact_backup_name orca_meta_tmp
714+ local status=$? endpoint_state endpoint_gone=1 account_clean=1 worktree_clean=1 rollback_lock=' ' rollback_tmp restored_existing_meta=0 artifact_backup_name orca_meta_tmp release_status
715715 trap - EXIT
716716 # This is an EXIT trap whose job is to attempt every independent cleanup
717717 # action and then return the original spawn status. The parent script runs
@@ -779,9 +779,11 @@ spawn_abort_cleanup() {
779779 [ -z " ${CONFIG_INHERIT_REPORT_TMP:- } " ] || rm -f " $CONFIG_INHERIT_REPORT_TMP "
780780 if [ " $ACCOUNT_SPAWN_COMMITTED " != 1 ] && [ " ${ACCOUNT_EFFECTIVE_MODE:- off} " = enforce ] && [ " $endpoint_gone " = 1 ]; then
781781 if [ " $ACCOUNT_LEASE_CREATED " = 1 ] || fm_account_mutation_owned; then
782- if ! fm_account_release " $ACCOUNT_TASK " --force 2> /dev/null; then
782+ release_status=0
783+ fm_account_release " $ACCOUNT_TASK " --force 2> /dev/null || release_status=$?
784+ if [ " $release_status " -ne 0 ]; then
783785 account_clean=0
784- echo " warning: failed to roll back Agent Fleet lease for ${ID:- unknown} " >&2
786+ echo " warning: failed to roll back Agent Fleet lease for ${ID:- unknown} (exit $release_status ) " >&2
785787 elif [ " $RESUME_ACCOUNT " != 1 ] && ! fm_account_session_remove " $ACCOUNT_TASK " 2> /dev/null; then
786788 account_clean=0
787789 echo " warning: failed to roll back Agent Fleet session for ${ID:- unknown} " >&2
You can’t perform that action at this time.
0 commit comments