Conversation
61860ee to
9b10dd4
Compare
Chessing234
left a comment
There was a problem hiding this comment.
Practical Windows fix — cmd /C can't exec the extensionless Vite shim, and node ./node_modules/vite/bin/vite.js is the portable entry point. Keeping exec on unix preserves Tauri's Ctrl-C process-group behavior. LGTM.
Chessing234
left a comment
There was a problem hiding this comment.
Approving the Windows Vite Node entry-point fix.
9b10dd4 to
b2f878c
Compare
b2f878c to
40be996
Compare
Use pnpm's project-local executable resolution instead of coupling the Tauri dev command to Vite's internal JavaScript entry point. Preserve the POSIX exec handoff outside Windows, skip the macOS icon generator elsewhere, and cover both generated command variants with a CI contract test. Builds on the platform handling from block#3515 and block#3534. Signed-off-by: Aria-iu <2357648739@qq.com>
Tauri runs beforeDevCommand through cmd /C on Windows, which has no exec and cannot execute the extensionless .bin/vite shim, so just dev fails before the app starts. Vite's Node entry point is portable; exec is kept elsewhere so Tauri's Ctrl+C still reaches Vite directly. Complements block#3515, which fixes the same launch for tauri.conf.json but not for the instance-env.sh path that just dev uses. Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
40be996 to
22749af
Compare
🔐 Codex Security Review
|
Summary
Launches Vite through its Node entry point in
scripts/instance-env.sh, sojust devstarts on Windows.Tauri runs
beforeDevCommandthroughcmd /Con Windows, which has noexecbuiltin and cannot execute the extensionless./node_modules/.bin/viteshim (onlyvite.CMD/vite.ps1are executable there).just devtherefore fails before the app window ever appears.node ./node_modules/vite/bin/vite.jsis portable, andexecis kept on every other platform so Tauri's Ctrl+C still reaches Vite directly rather than leaving it parented to the shell.Both
BUZZ_TAURI_CONFIGassignments are covered — the plain one and the worktree variant.Related issue
Part of #2388 (Windows Support).
Complements #3515, which applies the same Node entry point to
desktop/src-tauri/tauri.conf.json. The two do not overlap, and either can merge first.Worth flagging for reviewers of both PRs: the four recipes that start Tauri (
Justfilelines 472, 501, 528, 555) all pass--config "$BUZZ_TAURI_CONFIG", and that merged override carries its ownbeforeDevCommandbuilt here ininstance-env.sh. It therefore wins over the value intauri.conf.json, so #3515 alone does not unblock those recipes on Windows — this change is what does. #3515 covers a barepnpm tauri devinvocation, which readstauri.conf.jsondirectly.(#3515's description mentions
just desktop-dev; that recipe runspnpm exec vitedirectly without invoking Tauri, so it never readsbeforeDevCommandand is unaffected on either side.)Testing
Verified on Windows 11 (Git Bash,
MINGW64_NT-10.0):node ./node_modules/vite/bin/vite.js --versionfromdesktop/→vite/8.0.16 win32-x64 node-v24.15.0just devreaches the running desktop app; before this change it exited during startup.BUZZ_TEST_PLATFORMoverride —Darwinyields theexecform,MINGW64_NT-10.0yields the bare form.bash -n scripts/instance-env.shclean.Not verified: signal delivery on macOS/Linux is unchanged by inspection (
execretained), but I have no Apple or Linux hardware to confirm Ctrl+C behaviour end to end.