Fix: pause on error instead of closing PowerShell window

Replace exit 1 with Read-Host + return so users can read
the error message before the window closes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Rick Mu
2026-02-13 18:53:35 +11:00
parent 40983ec0ee
commit cde26a8f7f
3 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ $ErrorActionPreference = "Stop"
function Write-Info($msg) { Write-Host "[信息] $msg" -ForegroundColor Cyan }
function Write-Ok($msg) { Write-Host "[完成] $msg" -ForegroundColor Green }
function Write-Warn($msg) { Write-Host "[警告] $msg" -ForegroundColor Yellow }
function Write-Err($msg) { Write-Host "[错误] $msg" -ForegroundColor Red; exit 1 }
function Write-Err($msg) { Write-Host "[错误] $msg" -ForegroundColor Red; Read-Host "按 Enter 键退出"; return }
Write-Host ""
Write-Host "========================================" -ForegroundColor White