Skip to content

fix(cli): wrap zsh completion in eval for dash compatibility#1280

Merged
fengmk2 merged 3 commits intovoidzero-dev:mainfrom
shaneturner:fix/dash-env-compatibility
Apr 3, 2026
Merged

fix(cli): wrap zsh completion in eval for dash compatibility#1280
fengmk2 merged 3 commits intovoidzero-dev:mainfrom
shaneturner:fix/dash-env-compatibility

Conversation

@shaneturner
Copy link
Copy Markdown
Contributor

Description

Fixes an issue where Ubuntu desktop login fails because the generated ~/.vite-plus/env file contains Zsh-specific array syntax that is incompatible with the POSIX dash shell used during login.

Changes

  • Wrapped Zsh completion logic in an eval block in crates/vite_global_cli/src/commands/env/setup.rs.
  • Updated unit tests to check for the eval wrapper.

Verification

  • Manually verified the snippet using dash (POSIX compliant).
  • Note: Full pnpm test was blocked by upstream fspy compilation issues, but the fix follows the standard shell-portability pattern used in similar projects (e.g., nvm).

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 3, 2026

Deploy Preview for viteplus-preview canceled.

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

@fengmk2 fengmk2 requested a review from nekomoyi April 3, 2026 02:50
@fengmk2 fengmk2 self-assigned this Apr 3, 2026
@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 3, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ 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".

Copy link
Copy Markdown
Member

@fengmk2 fengmk2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shaneturner Thanks!

@shaneturner
Copy link
Copy Markdown
Contributor Author

Most welcome.

@fengmk2 fengmk2 merged commit 2e217f8 into voidzero-dev:main Apr 3, 2026
32 checks passed
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.

3 participants