Skip to content

Comments

Prevent PowerShell terminal from closing after setup#55

Closed
alex-feel wants to merge 2 commits intomainfrom
alex-feel-dev
Closed

Prevent PowerShell terminal from closing after setup#55
alex-feel wants to merge 2 commits intomainfrom
alex-feel-dev

Conversation

@alex-feel
Copy link
Owner

Problem

When users run the one-liner setup commands, the PowerShell terminal immediately closes after completion, preventing them from seeing the results or error messages.

Root Cause

PowerShell's default behavior is to close immediately after a script completes when launched for a single command (via Run dialog, shortcuts, or iex).

Solution

Added Read-Host pause prompts at all exit points in the bootstrap script to keep the terminal open until the user presses Enter.

Changes

  • Replace exit with throw to avoid force-closing the PowerShell session
  • Add "Press Enter to close..." prompts before all exit points
  • Display clear success/failure messages before pausing
  • Ensure terminal stays open for both successful and failed setups

Testing

Tested with various GitLab private repository configurations:

$env:CLAUDE_ENV_CONFIG='https://gitlab.example.com/.../config.yaml'; $env:GITLAB_TOKEN='token'; iex (irm 'setup-url')

Terminal now:

  1. Shows progress during setup
  2. Displays "Setup Complete!" on success
  3. Waits for user to press Enter
  4. Only closes when user is ready

Fixes #52

- Add Read-Host prompts before all exit points
- Show 'Press Enter to close...' messages for user control
- Display success/failure messages clearly before pausing
- Prevents terminal from disappearing when run via shortcuts or Run dialog
@alex-feel alex-feel changed the title fix: prevent PowerShell terminal from closing after setup Prevent PowerShell terminal from closing after setup Sep 5, 2025
@alex-feel alex-feel enabled auto-merge September 5, 2025 10:11
@alex-feel alex-feel disabled auto-merge September 5, 2025 10:11
- Add Read-Host prompts before all exit points
- Show 'Press Enter to close...' messages for user control
- Display success/failure messages clearly before pausing
- Prevents terminal from disappearing when run via shortcuts or Run dialog
@alex-feel alex-feel force-pushed the alex-feel-dev branch 2 times, most recently from bd3481d to d9e1bb3 Compare September 5, 2025 10:14
@alex-feel alex-feel closed this Sep 5, 2025
@alex-feel alex-feel deleted the alex-feel-dev branch September 5, 2025 10:19
Repository owner locked and limited conversation to collaborators Sep 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant