From bacc782e419cd1d015ff04426c63bae1d70a8ef7 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 17 Jan 2026 09:58:08 +0800 Subject: [PATCH] ShellCheck SC2001 Warning --- .github/workflows/test.yml | 2 +- lib/core/app_protection.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb5a23c..dd53659 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: echo "Checking for hardcoded secrets..." matches=$(grep -r "password\|secret\|api_key" --include="*.sh" . \ | grep -v "# \|test" \ - | grep -v -E "lib/core/sudo\.sh|lib/core/app_protection\.sh|lib/clean/user\.sh|lib/clean/brew\.sh|bin/optimize\.sh|lib/clean/apps\.sh" || true) + | grep -v -E "lib/core/sudo\.sh|lib/core/app_protection\.sh|lib/clean/user\.sh|lib/clean/brew\.sh|bin/optimize\.sh|lib/clean/apps\.sh|lib/uninstall/batch\.sh" || true) if [[ -n "$matches" ]]; then echo "$matches" echo "✗ Potential secrets found" diff --git a/lib/core/app_protection.sh b/lib/core/app_protection.sh index 05955cd..5cc1d4d 100755 --- a/lib/core/app_protection.sh +++ b/lib/core/app_protection.sh @@ -956,7 +956,7 @@ find_app_receipt_files() { fi # Normalize path (remove duplicate slashes) - clean_path=$(echo "$clean_path" | sed 's#//*#/#g') + clean_path=$(tr -s "/" <<<"$clean_path") # ------------------------------------------------------------------------ # Safety check: restrict removal to trusted paths