From d9b4592c506393020497bd64b89db3b2f068c82f Mon Sep 17 00:00:00 2001 From: pdmarf <135653545+pdmarf@users.noreply.github.com> Date: Sat, 18 Apr 2026 16:37:32 +0100 Subject: [PATCH] Fix setup.sh to print only current run of npm sudo config audit Use tee -a instead of redirect + cat, so only the current run's output is shown rather than the entire accumulated daily log. Co-Authored-By: Claude Sonnet 4.6 --- setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 8065dbe..b2c8f6c 100755 --- a/setup.sh +++ b/setup.sh @@ -100,10 +100,9 @@ echo "Running initial security scan..." bash "$SCRIPT_DIR/npm-security-check.sh" >> "$SCRIPT_DIR/logs/npm-security-check-$(date +%Y%m%d).log" 2>&1 && echo "npm-security-check: done." || echo "npm-security-check: issues found — check Telegram." bash "$SCRIPT_DIR/check-nextjs-rce.sh" >> "$SCRIPT_DIR/logs/check-nextjs-rce-$(date +%Y%m%d).log" 2>&1 && echo "check-nextjs-rce: done." || echo "check-nextjs-rce: issues found — check Telegram." NPM_SUDO_LOG="$SCRIPT_DIR/logs/check-npm-sudo-config-$(date +%Y%m%d).log" -bash "$SCRIPT_DIR/check-npm-sudo-config.sh" >> "$NPM_SUDO_LOG" 2>&1 && echo "check-npm-sudo-config: done." || echo "check-npm-sudo-config: issues found — check Telegram." echo "" echo "--- npm sudo config audit results ---" -cat "$NPM_SUDO_LOG" +bash "$SCRIPT_DIR/check-npm-sudo-config.sh" 2>&1 | tee -a "$NPM_SUDO_LOG" echo "-------------------------------------" echo "" echo "Initial scan complete. Check Telegram for any alerts."