diff --git a/action.yml b/action.yml index 8979bdc..a656568 100644 --- a/action.yml +++ b/action.yml @@ -326,20 +326,21 @@ runs: set -e # POST-TEST - if [ -n "${{ inputs.post-test-cmd }}" ]; then - echo "🧹 Running post-test commands..." | tee -a "$LOG_FILE" - set +e - eval "${{ inputs.post-test-cmd }}" >> "$LOG_FILE" 2>&1 - POST_STATUS=$? - set -e - if [ $POST_STATUS -ne 0 ]; then - echo "❌ Post-test failed" | tee -a "$LOG_FILE" - exec >/dev/null 2>&1 - echo "Exit Code: 1" >> "$LOG_FILE" - kill 0 || true - exit 1 + { + # tes commandes normales + if [ -n "${{ inputs.post-test-cmd }}" ]; then + echo "🧹 Running post-test commands..." + set +e + eval "${{ inputs.post-test-cmd }}" + POST_STATUS=$? + set -e + if [ $POST_STATUS -ne 0 ]; then + echo "❌ Post-test failed" + echo "Exit Code: 1" + exit 1 + fi fi - fi + } >>"$LOG_FILE" 2>&1 # SUCCESS echo "▶️ END" | tee -a "$LOG_FILE"