File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ if (-not $uvPath) {
4141 Write-Host " [FAIL] Failed to install uv: $_ " - ForegroundColor Red
4242 Write-Host " "
4343 Write-Host " Please install uv manually from: https://docs.astral.sh/uv/" - ForegroundColor Yellow
44- exit 1
44+ throw " uv installation failed "
4545 }
4646} else {
4747 Write-Host " [OK] uv is already installed" - ForegroundColor Green
6969 Write-Host " Available configurations:" - ForegroundColor Cyan
7070 Write-Host " - python : Python development environment" - ForegroundColor Gray
7171 Write-Host " "
72- exit 1
72+ throw " No configuration specified "
7373 }
7474
7575 Write-Host " [INFO] Using configuration: $config " - ForegroundColor Yellow
8181 # Clean up
8282 Remove-Item $tempScript - Force - ErrorAction SilentlyContinue
8383
84- exit $exitCode
84+ # Don't use exit when running with iex to avoid closing the terminal
85+ if ($exitCode -ne 0 ) {
86+ throw " Setup failed with exit code $exitCode "
87+ }
88+ return
8589} catch {
8690 Write-Host " [FAIL] Failed to run setup: $_ " - ForegroundColor Red
87- exit 1
91+ throw " Setup failed: $_ "
8892}
You can’t perform that action at this time.
0 commit comments