Conversation
Signed-off-by: kiranmagic7 <262980978+kiranmagic7@users.noreply.github.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>
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>
🔐 Codex Security Review
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes every Tauri development entry point launch the project-local Vite binary on Windows without relying on the POSIX-only
execbuiltin or a hard-coded package-internal JavaScript path.This consolidates the fixes from #3515 and #3534 while preserving their original authorship, then uses
pnpm exec vitefor executable resolution. Generated dev configs remain platform-aware: Windows runspnpm exec vite, while macOS and Linux retain anexec pnpm exec vitehandoff so Tauri signals reach the launched command without an extra shell process.The generated config now uses the same structured
beforeDevCommandshape astauri.conf.json, including its frontend working directory and non-blocking behavior. Non-macOS worktrees also skip the Swift-only development icon generator instead of printing a missing-command warning.A regression contract covers the checked-in Tauri config, Windows and POSIX generated commands, and the Windows Swift guard. It is wired into the repository policy CI job.
Related issue
Testing
scripts/test-desktop-dev-command-contract.sh— passed on Windows 11 / Git Bashbash -n scripts/instance-env.sh— passedbash -n scripts/test-desktop-dev-command-contract.sh— passedpnpm --dir desktop exec vite --version—vite/8.0.16 win32-x64 node-v24.14.0pnpm --dir desktop check— passed (reported existing non-blocking repository warnings)just --dry-run desktop-standalone— expanded successfullygit diff --check— passedNo UI is changed, so screenshots do not apply. Full macOS/Linux process-exit behavior was not exercised locally; the existing POSIX
exechandoff is retained and the generated command is covered by the contract test.