codex 설치 오류

This commit is contained in:
mcchae committed 2026-09-09 13:23:38 +09:00
1 parent f883330a45
commit 6e1aa7d4b4
1 file changed
+18 -9
+18 -9
View File
@@ -48,24 +48,33 @@ function Main {
Write-Info "===== Codex CLI install script (Windows PowerShell) =====" Write-Info "===== Codex CLI install script (Windows PowerShell) ====="
Write-Info "Installing OpenAI Codex CLI natively..." Write-Info "Installing OpenAI Codex CLI natively..."
try { $tmpDir = Join-Path $env:TEMP "codex_install_$(Get-Random)"
Write-Info "Fetching and executing official installer from: https://chatgpt.com/codex/install.ps1" New-Item -ItemType Directory -Path $tmpDir -Force | Out-Null
$scriptPath = Join-Path $tmpDir "install.ps1"
# 공식 설치 ps1 스크립트를 다운로드 및 메모리 상에서 직접 호출 가동 try {
$installerScript = Invoke-RestMethod -Uri "https://chatgpt.com/codex/install.ps1" -UseBasicParsing Write-Info "Downloading official installer from: https://releases.openai.com/codex/install.ps1"
Invoke-Expression $installerScript $ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://releases.openai.com/codex/install.ps1" -OutFile $scriptPath -UseBasicParsing
$ProgressPreference = 'Continue'
if (-not (Test-Path $scriptPath)) {
Write-Err "Failed to download official Codex CLI installer."
}
Write-Info "Executing official Codex CLI installer..."
& $scriptPath
Write-Success "Codex CLI has been successfully installed!" Write-Success "Codex CLI has been successfully installed!"
Write-Info "Please restart your terminal window or refresh your PATH environment variable." Write-Info "Please restart your terminal window or refresh your PATH environment variable."
Write-Info "Run command: codex auth (to log in) and then 'codex' to start." Write-Info "Run command: codex auth (to log in) and then 'codex' to start."
} catch { } catch {
Write-Err "Failed to install Codex CLI: $_" Write-Err "Failed to install Codex CLI: $_"
} finally {
if (Test-Path $tmpDir) {
Remove-Item -Path $tmpDir -Recurse -Force -ErrorAction SilentlyContinue
} }
} }
# 예기치 못한 전체 프로세스 에러 감지를 위한 Trap 설정
trap {
Write-Err "An unexpected error occurred during installation: $_"
} }
Main Main