From d7b9b6add708c8d68b6187f16634d235b40ab07d Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Mon, 6 Apr 2026 07:10:36 +0000 Subject: [PATCH] fix(cli): scope CI env var to child process in Windows install script (#1292) Use `cmd /c "set CI=true && ..."` instead of setting `$env:CI` directly, so the variable is scoped to the child process and does not persist in the user's PowerShell session. This prevented `vp create` from entering interactive mode when run in the same terminal after installation. Closes #1288 --- packages/cli/install.ps1 | 5 +++-- .../cli/snap-tests-global/new-vite-monorepo-bun/snap.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/cli/install.ps1 b/packages/cli/install.ps1 index 9385a0f2d1..4755b4e0cb 100644 --- a/packages/cli/install.ps1 +++ b/packages/cli/install.ps1 @@ -374,8 +374,9 @@ function Main { $installLog = Join-Path $VersionDir "install.log" Push-Location $VersionDir try { - $env:CI = "true" - & "$BinDir\vp.exe" install --silent *> $installLog + # Use cmd /c so CI=true is scoped to the child process only, + # avoiding leaking it into the user's shell session. + cmd /c "set CI=true && `"$BinDir\vp.exe`" install --silent" *> $installLog if ($LASTEXITCODE -ne 0) { Write-Host "error: Failed to install dependencies. See log for details: $installLog" -ForegroundColor Red exit 1 diff --git a/packages/cli/snap-tests-global/new-vite-monorepo-bun/snap.txt b/packages/cli/snap-tests-global/new-vite-monorepo-bun/snap.txt index 4ed92fb655..5e7d2b5d52 100644 --- a/packages/cli/snap-tests-global/new-vite-monorepo-bun/snap.txt +++ b/packages/cli/snap-tests-global/new-vite-monorepo-bun/snap.txt @@ -66,7 +66,7 @@ website "preview": "vp preview" }, "devDependencies": { - "typescript": "~5.9.3", + "typescript": "~6.0.2", "vite": "catalog:", "vite-plus": "catalog:" }