Skip to content

Commit 403fac0

Browse files
committed
fix: more improvement
1 parent 6bb5024 commit 403fac0

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

packages/cli/install.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,13 @@ function Main {
324324
# Install production dependencies (skip if VITE_PLUS_SKIP_DEPS_INSTALL is set,
325325
# e.g. during local dev where install-global-cli.ts handles deps separately)
326326
if (-not $env:VITE_PLUS_SKIP_DEPS_INSTALL) {
327+
$installLog = Join-Path $VersionDir "install.log"
327328
Push-Location $VersionDir
328329
try {
329330
$env:CI = "true"
330-
& "$BinDir\vp.exe" install
331+
& "$BinDir\vp.exe" install --silent *> $installLog
331332
if ($LASTEXITCODE -ne 0) {
332-
Write-Error "Failed to install dependencies. Please check the error output above."
333+
Write-Host "error: Failed to install dependencies. See log for details: $installLog" -ForegroundColor Red
333334
exit 1
334335
}
335336
} finally {

packages/cli/install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,10 @@ NPMRC_EOF
603603
# Install production dependencies (skip if VITE_PLUS_SKIP_DEPS_INSTALL is set,
604604
# e.g. during local dev where install-global-cli.ts handles deps separately)
605605
if [ -z "${VITE_PLUS_SKIP_DEPS_INSTALL:-}" ]; then
606-
if ! (cd "$VERSION_DIR" && CI=true "$BIN_DIR/vp" install 2>&1); then
607-
error "Failed to install dependencies. Re-run without piping to see full output:
608-
curl -fsSL https://vite.plus -o /tmp/vp-install.sh && bash /tmp/vp-install.sh"
606+
local install_log="$VERSION_DIR/install.log"
607+
if ! (cd "$VERSION_DIR" && CI=true "$BIN_DIR/vp" install --silent > "$install_log" 2>&1); then
608+
error "Failed to install dependencies. See log for details: $install_log"
609+
exit 1
609610
fi
610611
fi
611612

0 commit comments

Comments
 (0)