Skip to content

fix(tauri): inject-apprun path relative to frontend/ (where beforeBundleCommand runs) - #102

Merged
debpalash merged 1 commit into
mainfrom
fix/inject-apprun-path
May 20, 2026
Merged

fix(tauri): inject-apprun path relative to frontend/ (where beforeBundleCommand runs)#102
debpalash merged 1 commit into
mainfrom
fix/inject-apprun-path

Conversation

@debpalash

@debpalash debpalash commented May 20, 2026

Copy link
Copy Markdown
Owner

Summary

bun desktop-prod was 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

  • `bun desktop-prod` end-to-end on macOS — reaches "✅ Build complete" and launches the .app bundle
  • `inject-apprun.sh` invoked correctly from `frontend/`: outputs "no AppDir staging found (skipping)" on non-AppImage builds
  • AppImage build on Linux — to be verified by release.yml on the next tag push

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated build configuration settings.

Note: This is an internal maintenance update with no direct impact on end-user functionality.

Review Change Stack

…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>
@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8cf828ce-a91b-4749-b63a-5d9063c8e162

📥 Commits

Reviewing files that changed from the base of the PR and between f4e4082 and 59ad76f.

📒 Files selected for processing (1)
  • frontend/src-tauri/tauri.conf.json

📝 Walkthrough

Walkthrough

Updated the Tauri build configuration to correct the relative path for the beforeBundleCommand script. The path is adjusted from two directory levels up to one level up, reflecting the actual location of the inject-apprun.sh script relative to the configuration file.

Changes

Build Configuration Update

Layer / File(s) Summary
Tauri build script path correction
frontend/src-tauri/tauri.conf.json
The beforeBundleCommand relative path is updated from ../../scripts/inject-apprun.sh to ../scripts/inject-apprun.sh to correctly reference the injection script.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A path once tangled, now made clear,
Two levels back turned to one dear,
The script shall find its rightful home,
No more through directories to roam!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the summary, root cause, fix, and test plan, but does not follow the required template sections (Type, Testing checklist, etc.) that are specified in the repository. Add the template sections including Type (🐛 Bug fix), Testing checklist, and Checklist items to align with the required PR description format.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing the relative path for inject-apprun.sh in the Tauri configuration, which directly corresponds to the single-line change in tauri.conf.json.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/inject-apprun-path

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.

@debpalash
debpalash merged commit c6134ff into main May 20, 2026
8 checks passed
@debpalash
debpalash deleted the fix/inject-apprun-path branch May 20, 2026 04:19
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.

1 participant