fix: Remove EXIT from error trap to prevent false failures on successful completion

This commit is contained in:
Muhammad Ibrahim
2025-10-02 14:37:38 +01:00
parent e0eb544205
commit bbb97dbfda

View File

@@ -1,10 +1,10 @@
#!/bin/bash
set -euo pipefail # Exit on error, undefined vars, pipe failures
# Trap to catch any unexpected exits
trap 'echo "[ERROR] Script exited unexpectedly at line $LINENO with exit code $?"' ERR EXIT
# Trap to catch errors only (not normal exits)
trap 'echo "[ERROR] Script failed at line $LINENO with exit code $?"' ERR
SCRIPT_VERSION="1.0.0-debug.10"
SCRIPT_VERSION="1.0.1"
echo "[DEBUG] Script Version: $SCRIPT_VERSION ($(date +%Y-%m-%d\ %H:%M:%S))"
# =============================================================================