Fix: Double arithmetic syntax error in generate_comparison_report (line 2073)

This commit is contained in:
Developer
2026-04-23 21:16:33 -04:00
parent 8af1ca881b
commit ca7ec62e02
12 changed files with 121 additions and 70 deletions
+17 -5
View File
@@ -10,14 +10,22 @@ set -o pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CLEANUP_FLAG="/tmp/.cleanup_requested"
# Save original history setting to restore even if interrupted
HISTORY_SETTING=$(set +o | grep history)
# Save original history state to restore even if interrupted
HISTORY_STATE="off"
if set -o | grep -q "^set +o history" 2>/dev/null; then
HISTORY_STATE="on"
fi
RESTORE_HISTORY=false
# Cleanup function: restore history even on error/interrupt
cleanup_on_exit() {
if [ "$RESTORE_HISTORY" = true ]; then
eval "$HISTORY_SETTING" 2>/dev/null || true
if [ "$RESTORE_HISTORY" = true ] && [ -n "$HISTORY_STATE" ]; then
set +H # Disable history expansion temporarily
if [ "$HISTORY_STATE" = "on" ]; then
set -o history
else
set +o history
fi
fi
}
@@ -59,7 +67,11 @@ source "$SCRIPT_DIR/launcher.sh"
LAUNCHER_EXIT=$?
# Re-enable history (trap will also do this)
eval "$HISTORY_SETTING" 2>/dev/null || true
if [ "$HISTORY_STATE" = "on" ]; then
set -o history 2>/dev/null || true
else
set +o history 2>/dev/null || true
fi
RESTORE_HISTORY=false
# Handle cleanup request (if user selected "Clean and remove traces")