From 1709b3c7bf1f058df8cd33a965c47b7f4d56bae3 Mon Sep 17 00:00:00 2001 From: MK Date: Sat, 4 Apr 2026 10:16:22 +0800 Subject: [PATCH] fix(cli): scope CI env var to child process in Windows install script 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 +++-- 1 file changed, 3 insertions(+), 2 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