Skip to content

Fix Windows development setup: correct line endings and Rust PATH#2066

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
rmgy:fix/windows-dev-setup
May 19, 2026
Merged

Fix Windows development setup: correct line endings and Rust PATH#2066
senamakel merged 1 commit into
tinyhumansai:mainfrom
rmgy:fix/windows-dev-setup

Conversation

@rmgy
Copy link
Copy Markdown
Contributor

@rmgy rmgy commented May 18, 2026

Summary

  • Convert bash script line endings from CRLF to LF to support Git Bash on Windows
    • Add Rust cargo binary path ($HOME/.cargo/bin) to scripts/ensure-tauri-cli.sh PATH so cargo is available when pnpm tauri:ensure runs on Windows systems

Why

Windows developers running pnpm dev:app after installing Rust via rustup were seeing:

  • set: -x: invalid option and \r': command not found errors from shell scripts with CRLF line endings
    • cargo: command not found error when Rust is installed but not available in spawned bash subprocesses

What changed

  1. Line ending fix: Converted 73 bash scripts in scripts/ and app/scripts/ from CRLF to LF using sed. Git Bash interprets CRLF as invalid shell syntax.
  2. Rust PATH fix: Modified scripts/ensure-tauri-cli.sh line 21 to export:
  3. export PATH="$HOME/.cargo/bin:$INSTALL_ROOT/bin:$PATH"
  4. Ensures cargo is available in the environment where pnpm spawns the script.

Testing

  • Verified fix resolves cargo: command not found on Windows post-Rust installation
    • Test suite: 2,508 tests passing | 3 skipped
    • Linting: 50 warnings | 0 errors

Summary by CodeRabbit

  • Chores
    • Updated build script PATH configuration to include additional standard binary installation directories, improving reliability of locating the Tauri CLI during installation.

Review Change Stack

- 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.
@rmgy rmgy requested a review from a team May 18, 2026 08:44
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

📝 Walkthrough

Walkthrough

This PR updates the shell script ensure-tauri-cli.sh to include the Cargo default binary directory ($HOME/.cargo/bin) in the PATH before the custom installation root, ensuring binaries installed via Cargo are discoverable with higher precedence.

Changes

Tauri CLI PATH Configuration

Layer / File(s) Summary
PATH precedence update
scripts/ensure-tauri-cli.sh
The export PATH statement is updated to prepend $HOME/.cargo/bin before $INSTALL_ROOT/bin, changing binary lookup order for Cargo-installed executables like cargo-tauri.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A path through the forest, now clearer and wide,
Where Cargo's binaries run far and run free,
One line, one change—precedence certified,
Your tools find the right way, precisely and spree!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the two main changes: fixing Windows development setup through correcting line endings (CRLF to LF) and fixing the Rust PATH configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0f616e4 and 63c3224.

📒 Files selected for processing (1)
  • scripts/ensure-tauri-cli.sh

Comment thread scripts/ensure-tauri-cli.sh
@senamakel senamakel merged commit cce5d50 into tinyhumansai:main May 19, 2026
21 of 24 checks passed
mtkik pushed a commit to mtkik/openhuman-meet that referenced this pull request May 21, 2026
AusAgentSmith pushed a commit to AusAgentSmith/openhuman that referenced this pull request May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants