[codex] Add native Windows shell support#41
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@yurilopes i've no idea how openai have supported windows on codex CLI on windows, do it supports through custom powershell tool or smth? |
Yes, it does. It supports PowerShell and cmd.exe syntax. PowerShell syntax is the preferred one. I'm a heavy Windows user and have been using the changes I proposed with great results. It's seamless, just working fine with PowerShell. |
What changed
This PR improves DevSpace shell execution on Windows while preserving the existing Bash behavior for Linux, macOS, and users who explicitly opt into Bash.
DEVSPACE_SHELL=auto|bash|powershell|cmd.cmd.exesupport viaDEVSPACE_SHELL=cmd.DEVSPACE_SHELL=bashand non-Windows defaults.-matchusage with raw Windows path literals, including literals assigned to variables and then passed to-match.devspace doctor, MCP tool guidance, docs, and tests.Why
When ChatGPT generated PowerShell commands through the previous Bash-backed shell, Bash/MSYS could expand PowerShell syntax such as
$_.CommandLinebefore PowerShell received it. Native PowerShell execution fixes that transport issue.A second common failure mode remained: using PowerShell
-matchfor literal Windows path fragments.-matchis regex-based, so path fragments like\profilescan trigger malformed regex escapes such as\p. The new guardrail blocks the fragile pattern and tells the model to use.Contains(),-like, or[regex]::Escape().Impact
Windows users can run DevSpace with native PowerShell by default. Existing Bash workflows remain available with
DEVSPACE_SHELL=bash, and Linux/macOS behavior stays on the existing Bash backend.Validation
npm testnpm run typechecknpm run buildgit diff --checkdevspace doctoron Windows confirmedShell mode: autoresolves to native PowerShell.