Commit 2e217f8
fix(cli): wrap zsh completion in eval for dash compatibility (#1280)
#### 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).
Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>1 parent feefa31 commit 2e217f8
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
| 460 | + | |
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
| |||
918 | 920 | | |
919 | 921 | | |
920 | 922 | | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
921 | 927 | | |
922 | 928 | | |
923 | 929 | | |
| |||
0 commit comments