Fix Windows development setup: correct line endings and Rust PATH#2066
Conversation
- Convert bash script line endings from CRLF to LF to support Git Bash on Windows - Add Rust cargo binary path ($HOME/.cargo/bin) to ensure-tauri-cli.sh PATH so cargo is available when pnpm tauri:ensure runs on Windows systems This resolves the 'cargo: command not found' error when running pnpm dev:app on Windows after Rust installation.
📝 WalkthroughWalkthroughThis PR updates the shell script ChangesTauri CLI PATH Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/ensure-tauri-cli.sh`:
- Line 21: The PATH export currently prepends $HOME/.cargo/bin before
$INSTALL_ROOT/bin, which can cause a globally installed cargo-tauri to shadow
the vendored binary; change the export so $INSTALL_ROOT/bin appears before
$HOME/.cargo/bin (i.e., export PATH="$INSTALL_ROOT/bin:$HOME/.cargo/bin:$PATH")
to ensure the vendored cargo-tauri in INSTALL_ROOT is used first when resolving
commands like cargo tauri.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3c1294e2-7882-4f1a-ad49-f13f9cbed769
📒 Files selected for processing (1)
scripts/ensure-tauri-cli.sh
Summary
Why
Windows developers running
pnpm dev:appafter installing Rust via rustup were seeing:set: -x: invalid optionand\r': command not founderrors from shell scripts with CRLF line endingscargo: command not founderror when Rust is installed but not available in spawned bash subprocessesWhat changed
scripts/andapp/scripts/from CRLF to LF using sed. Git Bash interprets CRLF as invalid shell syntax.scripts/ensure-tauri-cli.shline 21 to export:Testing
cargo: command not foundon Windows post-Rust installationSummary by CodeRabbit