fix(shell): make envValue case-insensitive on all platforms#29380
fix(shell): make envValue case-insensitive on all platforms#29380SpencerJung wants to merge 2 commits into
Conversation
The envValue() function used case-sensitive process.env lookup on non-Windows platforms, but the $env: expansion regex is case-insensitive (/gi). This caused mixed-case env var references like $env:Path to fail on Linux/macOS when using pwsh, because process.env['Path'] returns undefined even when process.env['PATH'] exists. Remove the Windows-only check so envValue always performs a case-insensitive lookup across all platforms. Fixes anomalyco#29290
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: Potential duplicates found:
Both PRs appear to be addressing the same underlying issue (case-insensitive environment variable lookups), particularly PR #29371 which directly references issue #29290 that your current PR also fixes. |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Fixes #29290. The envValue() function used case-sensitive process.env lookup on non-Windows platforms, but the expansion regex is case-insensitive. Remove the Windows-only check so envValue always performs a case-insensitive lookup.