From f883330a45c5e6c4f3b8c53d331dd46936c8635e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B1=84=EB=AC=B8=EC=B0=BD=40MBA?= Date: Wed, 9 Sep 2026 13:21:42 +0900 Subject: [PATCH] =?UTF-8?q?claude=20code=20=EB=8B=A4=EB=A5=B8=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install-claude-code.ps1 | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/install-claude-code.ps1 b/install-claude-code.ps1 index db92ce7..51e84f5 100644 --- a/install-claude-code.ps1 +++ b/install-claude-code.ps1 @@ -44,18 +44,32 @@ function Main { Write-Info "===== Claude Code install script (Windows PowerShell) =====" Write-Info "Installing Claude Code (command-line AI assistant) natively..." - try { - Write-Info "Fetching and executing official installer from: https://claude.ai/install.ps1" + $tmpDir = Join-Path $env:TEMP "claude_install_$(Get-Random)" + New-Item -ItemType Directory -Path $tmpDir -Force | Out-Null + $scriptPath = Join-Path $tmpDir "bootstrap.ps1" - # Anthropic 공식 설치 ps1 스크립트를 다운로드 및 메모리 상에서 직접 호출 가동 - $installerScript = Invoke-RestMethod -Uri "https://claude.ai/install.ps1" -UseBasicParsing - Invoke-Expression $installerScript + try { + Write-Info "Downloading official installer from: https://downloads.claude.ai/claude-code-releases/bootstrap.ps1" + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest -Uri "https://downloads.claude.ai/claude-code-releases/bootstrap.ps1" -OutFile $scriptPath -UseBasicParsing + $ProgressPreference = 'Continue' + + if (-not (Test-Path $scriptPath)) { + Write-Err "Failed to download official Claude Code bootstrap installer." + } + + Write-Info "Executing official Claude Code installer..." + & $scriptPath Write-Success "Claude Code has been successfully installed!" Write-Info "Please restart your terminal window or refresh your PATH environment variable." Write-Info "Run command: claude" } catch { Write-Err "Failed to install Claude Code: $_" + } finally { + if (Test-Path $tmpDir) { + Remove-Item -Path $tmpDir -Recurse -Force -ErrorAction SilentlyContinue + } } }