From 7269cb8163916ac351950bfdc4f4f91e9999b8ed Mon Sep 17 00:00:00 2001 From: csbae-macbook Date: Wed, 4 Mar 2026 14:05:14 +0900 Subject: [PATCH] Prevent set -e from aborting on brew/npm install failures Add || fallback for brew install --cask, brew install node, and npm install commands so the script continues when individual packages fail (e.g. SHA mismatch in brew cache). Co-Authored-By: Claude Opus 4.6 --- setup_mac.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup_mac.sh b/setup_mac.sh index 6226dd2..85559a4 100755 --- a/setup_mac.sh +++ b/setup_mac.sh @@ -141,7 +141,7 @@ for app in "${APPS[@]}"; do echo "✅ $app 이미 설치됨" else echo "📦 $app 설치 중..." - brew install --cask "$app" + brew install --cask "$app" || echo "⚠️ $app 설치 실패. 나중에 수동으로 설치해주세요." fi done @@ -156,7 +156,7 @@ echo "🤖 Node.js & Claude Code 설치 중..." if brew list node &> /dev/null; then echo "✅ Node.js 이미 설치됨" else - brew install node + brew install node || { echo "⚠️ Node.js 설치 실패"; } echo "✅ Node.js 설치 완료" fi @@ -164,7 +164,7 @@ fi if command -v claude &> /dev/null; then echo "✅ Claude Code CLI 이미 설치됨" else - npm install -g @anthropic-ai/claude-code + npm install -g @anthropic-ai/claude-code || { echo "⚠️ Claude Code CLI 설치 실패. Node.js 설치를 확인해주세요."; } echo "✅ Claude Code CLI 설치 완료" fi