Skip to content

fix(cli): handle Homebrew installs during first-run setup - #2729

Merged
fengmk2 merged 9 commits into
mainfrom
fix/brew-self-setup-2719
Sep 17, 2026
Merged

fengmk2 merged 9 commits into
mainfrom
fix/brew-self-setup-2719

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 17, 2026

Copy link
Copy Markdown
Member

Fixes #2719.

First-run setup checks .vp-setup-complete beside vp, but writes it beside the managed copy. External installations therefore repeat setup and ignore their bundled JavaScript. A retry can also fail with EACCES when an interrupted setup leaves a read-only binary copy.

External binaries now record completed setup under <STATE>/self-setup. Complete Unix packages retain their binary and bundled JavaScript. Binaries without a bundled CLI reuse their completed managed installation. Setup replaces incomplete binary copies atomically.

Unix shims follow a public vp entrypoint that resolves to the running binary. This keeps them valid after package replacement. Setup preserves saved Node.js and package-manager preferences when the external binary changes.

Homebrew installations direct vp upgrade to brew upgrade vite-plus and disable npm update checks. vp implode removes user data and directs users to brew uninstall vite-plus for package removal. vp env doctor reports Homebrew ownership and checks the CLI path separately from the user shim directory.

Explicit installer requests still run setup. Vite+-managed installations keep their existing upgrade and rollback behavior.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 17, 2026

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-brew-self-setup-2719-viteplus-dev.voidzero-docs.workers.dev (commit ba55249)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://11ac7ec3-viteplus-dev.voidzero-docs.workers.dev ba55249 2026-09-17T08:30:49.856Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://eeccefca-viteplus-dev.voidzero-docs.workers.dev 506d51b 2026-09-17T08:17:20.374Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2200f117-viteplus-dev.voidzero-docs.workers.dev 09aaab8 2026-09-17T08:12:31.555Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2a8c88bc-viteplus-dev.voidzero-docs.workers.dev eab859e 2026-09-17T08:07:19.643Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://576f59d9-viteplus-dev.voidzero-docs.workers.dev f21dafe 2026-09-17T07:21:49.294Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2a0c473c-viteplus-dev.voidzero-docs.workers.dev adcf3e0 2026-09-17T07:17:13.620Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3b7cee09-viteplus-dev.voidzero-docs.workers.dev 5e39c89 2026-09-17T07:11:08.686Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3d741024-viteplus-dev.voidzero-docs.workers.dev 255e591 2026-09-17T04:56:10.183Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://cc52fa09-viteplus-dev.voidzero-docs.workers.dev 383bca3 2026-09-17T04:36:06.952Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e3b62adc-viteplus-dev.voidzero-docs.workers.dev 2af8e92 2026-09-17T03:38:48.257Z Visit the dashboard ↗

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

CLI artifact sizes (ba55249)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.15 MiB 2.15 MiB 0 B (0.00%)
packages/core/dist Directory total 3.95 MiB 3.95 MiB 0 B (0.00%)
Combined package dist Directory total 6.09 MiB 6.09 MiB 0 B (0.00%)
vp (Linux x64) Binary 11.18 MiB 11.22 MiB +36.01 KiB (+0.31%)
vp (Linux x64) gzip -9 4.84 MiB 4.85 MiB +14.37 KiB (+0.29%)
NAPI (Linux x64) Binary 32.01 MiB 32.01 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 12.69 MiB 12.69 MiB 0 B (0.00%)
vp (macOS ARM64) Binary 8.33 MiB 8.36 MiB +32.31 KiB (+0.38%)
vp (macOS ARM64) gzip -9 4.22 MiB 4.23 MiB +13.99 KiB (+0.32%)
NAPI (macOS ARM64) Binary 39.64 MiB 39.64 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 17.01 MiB 17.01 MiB 0 B (0.00%)
vp (Windows x64) Binary 9.06 MiB 9.10 MiB +38.50 KiB (+0.41%)
vp (Windows x64) gzip -9 3.96 MiB 3.97 MiB +15.62 KiB (+0.39%)
NAPI (Windows x64) Binary 26.98 MiB 26.98 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 10.80 MiB 10.80 MiB +8 B (+0.00%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.03 KiB 7.03 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.53 MiB 4.53 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.12 MiB 2.12 MiB -1 B (-0.00%)

@fengmk2
fengmk2 requested a review from liangmiQwQ September 17, 2026 04:09
@fengmk2 fengmk2 self-assigned this Sep 17, 2026
@fengmk2
fengmk2 marked this pull request as ready for review September 17, 2026 04:13
@fengmk2 fengmk2 added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests test: sfw preview-build Publish this PR's commits to the registry bridge as preview builds labels Sep 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Registry bridge build (2af8e92)

This commit build is published to the registry bridge, which serves these as ordinary npm versions (every other package proxies to npmjs):

Package Version
vite-plus 0.0.0-commit.2af8e925d1dfe311f05a45f153fa8c6e37fbe359
@voidzero-dev/vite-plus-core 0.0.0-commit.2af8e925d1dfe311f05a45f153fa8c6e37fbe359

Install the Vite+ CLI built from this commit, then migrate a project:

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/2af8e925d1dfe311f05a45f153fa8c6e37fbe359/packages/cli/install.sh | VP_PR_VERSION=2729 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/voidzero-dev/vite-plus/2af8e925d1dfe311f05a45f153fa8c6e37fbe359/packages/cli/install-legacy.sh bash
# Windows (PowerShell)
$env:VP_PR_VERSION="2729"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/voidzero-dev/vite-plus/2af8e925d1dfe311f05a45f153fa8c6e37fbe359/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/2af8e925d1dfe311f05a45f153fa8c6e37fbe359/packages/cli/install.ps1 | iex

Or download the standalone Windows installer built from this commit:

Architecture Installer
x64 vp-setup-x86_64-pc-windows-msvc.exe
Arm64 vp-setup-aarch64-pc-windows-msvc.exe

GitHub requires you to sign in and downloads each installer as a ZIP artifact. Extract vp-setup.exe, then run it against this preview build:

.\vp-setup.exe --version "0.0.0-commit.2af8e925d1dfe311f05a45f153fa8c6e37fbe359" --registry "https://registry-bridge.viteplus.dev/"

After installing, upgrade the current project's vite-plus to this test build with:

vp migrate

Or point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:

Package manager Registry config
npm / pnpm / Bun .npmrc: registry=https://registry-bridge.viteplus.dev/
Yarn (v2+) .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/"

Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):

{
  "devDependencies": {
    "vite-plus": "0.0.0-commit.2af8e925d1dfe311f05a45f153fa8c6e37fbe359",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.2af8e925d1dfe311f05a45f153fa8c6e37fbe359"
  }
}

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: ba55249

@github-actions

Copy link
Copy Markdown
Contributor

🐳 Docker preview image

Built from this PR's registry bridge build:

Image Compressed size
ghcr.io/voidzero-dev/vite-plus:pr-2729 223MB
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-2729 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-2729

Quick check:

docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-2729 vp --version

See docs/guide/docker.md for usage.

Comment thread docs/guide/implode.md Outdated
@fengmk2 fengmk2 linked an issue Sep 17, 2026 that may be closed by this pull request
3 tasks
@fengmk2
fengmk2 force-pushed the fix/brew-self-setup-2719 branch from eab859e to 09aaab8 Compare September 17, 2026 08:11
@fengmk2
fengmk2 added this pull request to stack #2733 September 17, 2026 09:07

@liangmiQwQ liangmiQwQ left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a user run Vite+ for the first time, it will run self-setup logic first and then continue running the original commands.

This is an intentional design in my previous PR, and I think we shouldn't do that for HomeBrew installation. Commands like vp env use doesn't work, shims like node / pnpm wouldn't be loaded at that time, either.

We'd better prompt users to restart the terminal after self-setup, and stop running users' commands like normal installation for HomeBrew. Adding a document section for that might also be good.

That said, we still need to keep commands running behavior by default to ensure the compatibility.

@liangmiQwQ liangmiQwQ left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new self-setup mark file location and other ideas LGTM :)

@fengmk2
fengmk2 removed this pull request from stack #2733 September 17, 2026 14:47
@fengmk2
fengmk2 merged commit cd27fac into main Sep 17, 2026
161 of 165 checks passed
@fengmk2
fengmk2 deleted the fix/brew-self-setup-2719 branch September 17, 2026 14:47
fengmk2 added a commit that referenced this pull request Sep 18, 2026
This release fixes Homebrew setup, Windows installation, and workspace
dependency commands. It also updates Rolldown, Oxlint, and Oxfmt.

### Fixes & Enhancements

- Homebrew installations complete setup once, retain their bundled CLI,
and direct upgrades to `brew upgrade vite-plus`
([#2729](#2729)), by
@fengmk2.
- Windows installations decode remote legacy PowerShell scripts
correctly
([#2701](#2701)), by
@james-elicx.
- `vp migrate` removes the unsupported React Refresh
`allowCompoundComponents` option and warns about possible lint errors
([#2702](#2702)), by
@fengmk2.
- New monorepo packages use the root lint configuration without a
conflicting nested configuration
([#2667](#2667)), by
@semimikoh.
- Yarn Classic rejects filtered additions and removals instead of
changing unintended dependencies
([#2705](#2705)), by
@jong-kyung.
- Yarn Berry rejects unsupported filtered updates and respects filters
during recursive removal
([#2709](#2709),
[#2712](#2712)), by
@jong-kyung.
- Yarn and Bun warn when a command does not support `--workspace-root`.
Yarn Classic accepts root additions through `vp add` and `vp install
<packages>`
([#2713](#2713)), by
@jong-kyung.
- `vp dedupe` warns about unsupported check options
([#2717](#2717)), by
@jong-kyung.
- Rust command output respects `NO_COLOR`
([#2716](#2716)), by
@liangmiQwQ.
- Windows commands find lowercase shims in directories with
case-sensitive file names
([#2727](#2727)), by
@fengmk2.

### Dependency Updates

- Update `rolldown@1.2.8` to `rolldown@1.2.9`, `oxlint@1.82.0` to
`oxlint@1.83.0`, and `oxfmt@0.67.0` to `oxfmt@0.68.0`. The new lint and
format versions can flag code that passed before. Run `vp fmt` after
upgrading if CI runs `vp check`
([#2725](#2725)), by
@voidzero-guard[bot].

### Docs

- Reorganize the guide and expand the global CLI sections
([#2684](#2684),
[#2715](#2715)), by
@liangmiQwQ.
- Explain Nushell startup requirements and recovery for XDG
installations
([#2704](#2704)), by
@naokihaba.

### Chore

- Add documentation previews for fork PRs
([#2691](#2691)), by
@fengmk2.
- Publish `@voidzero-dev/vite-plus-prompts` with npm releases
([#2707](#2707)), by
@fengmk2.
- Reuse native preview installations and clarify release evidence and
package checks
([#2693](#2693),
[#2708](#2708)), by
@fengmk2.
- Stabilize dependency-removal snapshots and temporarily skip Socket
Firewall tests on Windows
([#2711](#2711),
[#2730](#2730)), by
@fengmk2.
- Clarify package-manager comments and update the preview workflow
reference ([#2706](#2706),
[#2714](#2714)), by
@jong-kyung.
- Run dependency upgrade automation with Kimi K3
([#2723](#2723)), by
@Brooooooklyn.

### Bundled Versions

| Tool | Version | Source |
| --- | --- | --- |
| `vite` | `8.3.0` |
[`434e8e9`](vitejs/vite@434e8e9)
|
| `rolldown` | `1.2.9` |
[`5b4746e`](rolldown/rolldown@5b4746e)
|
| `tsdown` | `0.23.0` | [npm](https://npmx.dev/package/tsdown/v/0.23.0)
|
| `vitest` | `4.1.11` | [npm](https://npmx.dev/package/vitest/v/4.1.11)
|
| `oxlint` | `1.83.0` | [npm](https://npmx.dev/package/oxlint/v/1.83.0)
|
| `oxlint-tsgolint` | `7.0.2001` |
[npm](https://npmx.dev/package/oxlint-tsgolint/v/7.0.2001) |
| `oxfmt` | `0.68.0` | [npm](https://npmx.dev/package/oxfmt/v/0.68.0) |

### Upgrade

```bash
vp upgrade
```

### New Contributors

@james-elicx

**Full Changelog**:
v0.3.2...v0.3.3

---

Merging this PR will trigger the release workflow.

---------

Co-authored-by: voidzero-guard[bot] <278573678+voidzero-guard[bot]@users.noreply.github.com>
Co-authored-by: MK <fengmk2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-build Publish this PR's commits to the registry bridge as preview builds test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: sfw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error: Command execution failed: Permission denied (os error 13) - 0.3.2

3 participants