Skip to content

Commit 3c260a1

Browse files
authored
fix: use staging install scripts to fix Windows runner failures (#11)
## Summary - Temporarily switch install URLs from `viteplus.dev` to `staging.viteplus.dev` to fix the `Cannot find module 'which'` error on Windows runners (#10) - Add `test-vp-exec` and `test-vp-install-and-exec` jobs that run `vp exec` and `vp run` across all platforms (ubuntu, macos, windows) to prevent regressions ## Context Issue #10 reports that `vp exec` fails on Windows runners with: ``` Error: Cannot find module 'which' ``` The root cause is in the vite-plus install script served from `viteplus.dev`. The staging version (`staging.viteplus.dev`) has the fix. Once a new version of vite-plus is released with the fix, we'll revert the domain back to `viteplus.dev`. ## Changes - `src/install-viteplus.ts`: Switch install URLs to `staging.viteplus.dev` (temporary) - `.github/workflows/test.yml`: Add `test-vp-exec` and `test-vp-install-and-exec` test jobs ## Test plan - [x] `test-vp-exec` passes on all platforms (ubuntu, macos, windows) - [x] `test-vp-install-and-exec` passes on all platforms Closes #10 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 6f7287d commit 3c260a1

3 files changed

Lines changed: 58 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,61 @@ jobs:
131131
echo "Installed version: ${{ steps.setup.outputs.version }}"
132132
echo "Cache hit: ${{ steps.setup.outputs.cache-hit }}"
133133
134+
test-vp-exec:
135+
strategy:
136+
fail-fast: false
137+
matrix:
138+
os: [ubuntu-latest, macos-latest, windows-latest]
139+
runs-on: ${{ matrix.os }}
140+
steps:
141+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
142+
143+
- name: Setup Vite+
144+
uses: ./
145+
with:
146+
version: latest
147+
run-install: false
148+
cache: false
149+
150+
- name: Verify vp exec works
151+
run: vp exec node -e "console.log('vp exec works')"
152+
153+
- name: Verify vp run works (list available scripts)
154+
run: vp run --list
155+
continue-on-error: true
156+
157+
test-vp-install-and-exec:
158+
strategy:
159+
fail-fast: false
160+
matrix:
161+
os: [ubuntu-latest, macos-latest, windows-latest]
162+
runs-on: ${{ matrix.os }}
163+
steps:
164+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
165+
166+
- name: Create test project
167+
shell: bash
168+
run: |
169+
mkdir -p test-project
170+
cd test-project
171+
echo '{"name":"test-project","private":true,"scripts":{"hello":"node -e \"console.log(1+1)\""}}' > package.json
172+
173+
- name: Setup Vite+ with install
174+
uses: ./
175+
with:
176+
version: latest
177+
run-install: |
178+
- cwd: test-project
179+
cache: false
180+
181+
- name: Verify vp exec in project
182+
working-directory: test-project
183+
run: vp exec node -e "console.log('vp exec in project works')"
184+
185+
- name: Verify vp run in project
186+
working-directory: test-project
187+
run: vp run hello
188+
134189
test-registry-url:
135190
runs-on: ubuntu-latest
136191
steps:

0 commit comments

Comments
 (0)