Skip to content

Never select PowerShell if it isn't available#42

Merged
cottsay merged 1 commit intomasterfrom
cottsay/no-powershell-exe
Feb 9, 2026
Merged

Never select PowerShell if it isn't available#42
cottsay merged 1 commit intomasterfrom
cottsay/no-powershell-exe

Conversation

@cottsay
Copy link
Member

@cottsay cottsay commented Jan 29, 2026

Regardless of our heuristics for determining if PowerShell is in use, we should never attempt to use PowerShell as the primary shell if it isn't installed.

Regardless of our heuristics for determining if PowerShell is in use, we
should never attempt to use PowerShell as the primary shell if it isn't
installed.
@cottsay cottsay self-assigned this Jan 29, 2026
@cottsay cottsay added the bug Something isn't working label Jan 29, 2026
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (2724c2c) to head (c890329).

Files with missing lines Patch % Lines
colcon_powershell/shell/powershell.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master     #42   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           2       2           
  Lines          81      83    +2     
======================================
- Misses         81      83    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MatthijsBurgh
Copy link

@cottsay This PR is probably a situation which showcases the heuristics aren't robust.

@cottsay
Copy link
Member Author

cottsay commented Feb 9, 2026

... the heuristics aren't robust.

Yeah, agreed, we were discussing the same in #39. I don't think the environment variables change enough when using pwsh for us to reliably determine if we're actually running under PowerShell.

This PR isn't a solution in the slightest. I'm open to suggestions on how we might more reliably tell if we're invoked from pwsh on non-Windows platforms.

@cottsay cottsay merged commit 8f1fb0e into master Feb 9, 2026
22 checks passed
@cottsay cottsay deleted the cottsay/no-powershell-exe branch February 9, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

3 participants