Commit 543a054
fix(cli): show errors when vp install fails and bypass npm & pnpm minimum release age (#834)
## Summary
resolve #833
- Remove `--silent` from `vp install` in `install.sh` so that pnpm/npm
errors are visible to the user instead of being silently swallowed
- Add a local `.npmrc` with `minimum-release-age=0` to the version
directory to isolate the installer from the user's global pnpm
configuration (e.g. `minimumReleaseAge` blocking recently-published
packages)
Previously, when `vp install --silent` failed (for any reason), `set -e`
would abort `install.sh` with no error output, leaving `~/.vite-plus/`
in a partial state: no `node_modules`, no `bin/` symlink, no `env` file,
and no PATH configuration.
---------
Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>1 parent 2223726 commit 543a054
2 files changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
319 | 324 | | |
320 | 325 | | |
321 | 326 | | |
| 327 | + | |
322 | 328 | | |
323 | 329 | | |
324 | 330 | | |
325 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
326 | 336 | | |
327 | 337 | | |
328 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
595 | 603 | | |
596 | 604 | | |
597 | 605 | | |
598 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
599 | 611 | | |
600 | 612 | | |
601 | 613 | | |
| |||
0 commit comments