Skip to content

fix(utils): detect Windows shell type for correct installer selection#247

Open
8nevil8 wants to merge 1 commit intomainfrom
fix/windows-installer-shell-detection
Open

fix(utils): detect Windows shell type for correct installer selection#247
8nevil8 wants to merge 1 commit intomainfrom
fix/windows-installer-shell-detection

Conversation

@8nevil8
Copy link
Copy Markdown
Collaborator

@8nevil8 8nevil8 commented Apr 13, 2026

Summary

Improves the Windows native installer by detecting which shell is active at runtime (PowerShell, Git Bash/MSYS2, or CMD) and selecting the appropriate installer command accordingly.

Changes

  • Added windowsPs?: string field to InstallerUrls type for a PowerShell-specific installer URL
  • Added detectWindowsShell() utility to distinguish between PowerShell (PS5/PS7), Git Bash/MSYS2, and CMD based on environment variables
  • Claude plugin now provides a dedicated PowerShell installer URL (https://claude.ai/install.ps1)
  • native-installer.ts uses the PowerShell installer when PowerShell is detected, with CMD fallback otherwise

Impact

Before: Windows always used the CMD-compatible installer regardless of the active shell, which could fail or behave poorly in PowerShell environments.

After: PowerShell users get the PowerShell-native installer; CMD and Git Bash users get the appropriate fallback.

Checklist

  • Self-reviewed
  • Manual testing performed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)

Add detectWindowsShell() to distinguish PowerShell, Git Bash/MSYS2, and CMD
at runtime. Use windowsPs installer URL when PowerShell is detected, falling
back to the CMD-compatible installer otherwise.

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
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.

1 participant