Skip to content

fix(env): support PowerShell on non-Windows platforms#1481

Merged
fengmk2 merged 8 commits intovoidzero-dev:mainfrom
nekomoyi:fix/pwsh-env-setup-vp-binary
Apr 27, 2026
Merged

fix(env): support PowerShell on non-Windows platforms#1481
fengmk2 merged 8 commits intovoidzero-dev:mainfrom
nekomoyi:fix/pwsh-env-setup-vp-binary

Conversation

@nekomoyi
Copy link
Copy Markdown
Collaborator

@nekomoyi nekomoyi commented Apr 26, 2026

PowerShell is not Windows-only, but vp env setup was generating env.ps1 with vp.exe. That breaks pwsh users on non-Windows platforms.

Changes

  • Replace vp.exe with vp in the generated env.ps1
  • Add PowerShell coverage in CLI E2E
  • Explicitly identify PowerShell wrapper execution via VP_SHELL_PWSH

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 26, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 1b850ec
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69ef9e1bff9bd00008583ef6

@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 27, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fengmk2 fengmk2 added the test: create-e2e Run `vp create` e2e tests label Apr 27, 2026
@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 27, 2026

@nekomoyi Could you add a corresponding test job in our CI? I'm concerned that future code changes might still modify this code without discovering this special logic.

@nekomoyi
Copy link
Copy Markdown
Collaborator Author

nekomoyi commented Apr 27, 2026

@fengmk2 Thanks. I’ve updated the PowerShell coverage in CI.

The PowerShell path in our CLI E2E test can now run cross-platform. PowerShell steps go through the shell env wrapper instead of calling the vp binary directly. At the moment, the PowerShell steps are still skipped on namespace-profile-linux-x64-default because that runner does not have pwsh preinstalled.

I also adjusted detect_shell() so that PowerShell wrapper execution is identified by VP_SHELL_PWSH instead of PsModulePath and cfg!(windows).

This fixes the immediate non-Windows pwsh issue, but detect_shell() can still be confused by inherited variables like FISH_VERSION in nested shell scenarios. I’m leaving that for a follow-up with a cleaner approach.

@fengmk2 fengmk2 merged commit c38d081 into voidzero-dev:main Apr 27, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: create-e2e Run `vp create` e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants