diff --git a/bin/purge.sh b/bin/purge.sh index 4f7b104..b169a77 100755 --- a/bin/purge.sh +++ b/bin/purge.sh @@ -99,11 +99,11 @@ perform_purge() { truncate_path() { local path="$1" local term_cols - term_cols=$(tput cols 2>/dev/null || echo 80) + term_cols=$(tput cols 2> /dev/null || echo 80) # Reserve some space for the spinner and text (approx 20 chars) local max_len=$((term_cols - 20)) # Ensure a reasonable minimum width - if (( max_len < 40 )); then + if ((max_len < 40)); then max_len=40 fi diff --git a/cmd/status/metrics_health_test.go b/cmd/status/metrics_health_test.go index 8c4362f..3bd2497 100644 --- a/cmd/status/metrics_health_test.go +++ b/cmd/status/metrics_health_test.go @@ -62,14 +62,14 @@ func TestColorizeTempThresholds(t *testing.T) { temp float64 expected string }{ - {temp: 30.0, expected: "30.0"}, // Normal - should use okStyle (green) - {temp: 55.9, expected: "55.9"}, // Just below warning threshold - {temp: 56.0, expected: "56.0"}, // Warning threshold - should use warnStyle (yellow) - {temp: 65.0, expected: "65.0"}, // Mid warning range - {temp: 75.9, expected: "75.9"}, // Just below danger threshold - {temp: 76.0, expected: "76.0"}, // Danger threshold - should use dangerStyle (red) - {temp: 90.0, expected: "90.0"}, // High temperature - {temp: 0.0, expected: "0.0"}, // Edge case: zero + {temp: 30.0, expected: "30.0"}, // Normal - should use okStyle (green) + {temp: 55.9, expected: "55.9"}, // Just below warning threshold + {temp: 56.0, expected: "56.0"}, // Warning threshold - should use warnStyle (yellow) + {temp: 65.0, expected: "65.0"}, // Mid warning range + {temp: 75.9, expected: "75.9"}, // Just below danger threshold + {temp: 76.0, expected: "76.0"}, // Danger threshold - should use dangerStyle (red) + {temp: 90.0, expected: "90.0"}, // High temperature + {temp: 0.0, expected: "0.0"}, // Edge case: zero } for _, tt := range tests { diff --git a/lib/core/app_protection.sh b/lib/core/app_protection.sh index 12d2ae8..70e0cb6 100755 --- a/lib/core/app_protection.sh +++ b/lib/core/app_protection.sh @@ -415,8 +415,8 @@ readonly DATA_PROTECTED_BUNDLES=( "com.netease.163music" # NetEase Music # Web Browsers (protect complex storage like IndexedDB, localStorage) - "Firefox" # Firefox Application Support - "org.mozilla.*" # Firefox bundle IDs + "Firefox" # Firefox Application Support + "org.mozilla.*" # Firefox bundle IDs # License Management & App Stores "com.paddle.Paddle*" # Paddle (license management)