fix(tauri): inject-apprun path relative to frontend/ (where beforeBundleCommand runs) - #102
Conversation
…dleCommand runs) Tauri's `beforeBundleCommand` runs from the directory containing the frontend `package.json` (i.e. `frontend/`), not from `frontend/src-tauri/`. The Phase 1 Wave 3 work wired the AppRun injector with the wrong relative prefix — `../../scripts/inject-apprun.sh` goes one level *above* the project root, so `bun desktop-prod` failed at the bundle step with "bash: ../../scripts/inject-apprun.sh: No such file or directory" on every developer machine. Fix: drop one `../`. The script itself was already correct (used absolute paths internally), so on macOS where there's no AppDir staging it cleanly exits 0 with "no AppDir staging found (skipping)". Verified: full `bun desktop-prod` cycle now reaches "✅ Build complete" and launches the .app bundle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated the Tauri build configuration to correct the relative path for the ChangesBuild Configuration Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
bun desktop-prodwas failing on every developer machine at the bundle step with:```
Running beforeBundleCommand `bash ../../scripts/inject-apprun.sh`
bash: ../../scripts/inject-apprun.sh: No such file or directory
beforeBundleCommand failed with exit code 127
Build failed with exit code 1
```
Root cause: Tauri's `beforeBundleCommand` runs from the directory containing the frontend `package.json` (`frontend/`), not from `frontend/src-tauri/`. The Phase 1 Wave 3 work used the wrong relative prefix — `../../scripts/inject-apprun.sh` resolved one level above the project root, so the script was never found.
Fix: drop one `../`. The script itself was correct (uses absolute paths internally), so on macOS it cleanly exits with "no AppDir staging found (skipping — not an AppImage build)" once the path resolves.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Note: This is an internal maintenance update with no direct impact on end-user functionality.