Commit a2876b6
feat(cli): error on
Currently, running `vp install -g` with no package names will silently
fall through to a regular workspace install, ignoring `--global`
entirely, as the `global` check logic will only happen after checking
package name is provided.
This PR adjusted clap config to make sure package is provided when using
`--global` flag, also adjusted help output for more clear guidance.
Global snap test is also added to cover this case.
Generated with [Claude Code](https://claude.com/claude-code) and Codex
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>vp install -g without package names (#1472)1 parent dbbd739 commit a2876b6
5 files changed
Lines changed: 17 additions & 3 deletions
File tree
- crates/vite_global_cli/src
- packages/cli/snap-tests-global
- cli-helper-message
- command-install-globally-no-args
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
| 148 | + | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments