Skip to content

fix(install): prevent PowerShell window close on errors via iex#109

Merged
largeoliu merged 1 commit into
masterfrom
fix/install-ps1-compatibility
May 10, 2026
Merged

fix(install): prevent PowerShell window close on errors via iex#109
largeoliu merged 1 commit into
masterfrom
fix/install-ps1-compatibility

Conversation

@largeoliu
Copy link
Copy Markdown
Owner

Summary

  • Replace exit 1 with throw in Write-Error-Exit to avoid terminating the PowerShell host process
  • Wrap main logic in try/catch so error messages are visible instead of the window closing immediately when running irm ... | iex

Test plan

  • Verify irm ... | iex no longer causes window to close on errors
  • Verify normal installation flow still works correctly

Replace `exit 1` with `throw` and wrap main logic in try/catch
so errors are displayed instead of terminating the host process
when running `irm ... | iex`.
@largeoliu largeoliu force-pushed the fix/install-ps1-compatibility branch from b043e8a to 8770eea Compare May 10, 2026 07:58
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@largeoliu largeoliu merged commit 252e7ef into master May 10, 2026
17 checks passed
@largeoliu largeoliu deleted the fix/install-ps1-compatibility branch May 10, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants