Skip to content

Commit 6a6be88

Browse files
committed
fix(cli): show errors when vp install fails and bypass pnpm minimumReleaseAge
1 parent bc3657f commit 6a6be88

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

packages/cli/install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,19 @@ main() {
574574
}
575575
WRAPPER_EOF
576576

577+
# Isolate from user's global pnpm config (e.g. minimumReleaseAge)
578+
# by creating a local .npmrc in the version directory.
579+
cat > "$VERSION_DIR/.npmrc" <<NPMRC_EOF
580+
minimum-release-age=0
581+
NPMRC_EOF
582+
577583
# Install production dependencies (skip if VITE_PLUS_SKIP_DEPS_INSTALL is set,
578584
# e.g. during local dev where install-global-cli.ts handles deps separately)
579585
if [ -z "${VITE_PLUS_SKIP_DEPS_INSTALL:-}" ]; then
580-
(cd "$VERSION_DIR" && CI=true "$BIN_DIR/vp" install --silent)
586+
if ! (cd "$VERSION_DIR" && CI=true "$BIN_DIR/vp" install 2>&1); then
587+
error "Failed to install dependencies. Re-run without piping to see full output:
588+
curl -fsSL https://vite.plus -o /tmp/vp-install.sh && bash /tmp/vp-install.sh"
589+
fi
581590
fi
582591

583592
# Create/update current symlink (use relative path for portability)

0 commit comments

Comments
 (0)