Windows: missing cmake alone launches a blocking VS Build Tools GUI installer
On Windows, a missing cmake alone triggers a blocking Visual Studio Build Tools GUI installer — even when a complete, correctly detected MSVC toolchain is already present.
What happens
checkDependencies() runs the installer whenever any dependency is missing:
if (missingDeps.length > 0) { ... await installWindowsDeps(); } // build.ts:547installWindowsDeps() invokes the helper without -Quiet (build.ts:508), so install-windows-deps.ps1 takes its GUI branch:
Write-Host "Launching Visual Studio Build Tools installer GUI. Please select 'Desktop development with C++' and install."
Start-Process -FilePath $vsInstaller -WaitThe script downloads and launches vs_BuildTools.exe unconditionally — it never checks whether VS is already installed — and cmake (the thing actually missing) is only installed after that returns. So the build parks on:
Running Windows dependency installer (may require Administrator privileges)...until someone notices a GUI window and dismisses it.
On my machine VS detection was working correctly the whole time — Electrobun's own vswhere query returns the right path:
$ vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools # exit 0and the build had already logged ✓ Found MSVC tools with vcvarsall.bat. The only missing dep was cmake.
Worse, the VS Installer GUI latched onto an unrelated, incomplete VS 2019 instance on the machine and began updating it — collateral changes to an install that has nothing to do with Electrobun.
Repro
On Windows with VS Build Tools 2022 installed and cmake absent, run hutch dev from package/.
Why CI misses it
build.ts:549 already guards this path:
// In CI we should not attempt interactive installs
if (process.env["GITHUB_ACTIONS"]) { ...warn and continue... }so the interactive branch never runs on runners.
Suggested fix
- Install only what is actually missing, rather than running the whole helper for any missing dep.
- Have
install-windows-deps.ps1skip the VS install whenfindVisualStudioInstallation()already resolves. - Prefer the
-Quietbranch, or at minimum print which dependency triggered the installer.
Environment
Windows 11 Pro 26200 · VS Build Tools 2022 17.14.37614.0 · Hutch 0.26.0-canary.9
Source: blackboardsh/electrobun