fix: root local runtime at home dir, not process.cwd()

The embedded desktop local runtime used process.cwd() as its data root.
When a packaged build is launched from a desktop launcher or file manager
(notably the Linux AppImage), cwd is `/` or the read-only squashfs mount
point, so creating `<cwd>/.fusion/fusion.db` failed with EACCES/EROFS and
the runtime never started ("Couldn't start local Fusion").

Resolve the root from the user's home directory instead, so data lives in
`~/.fusion` (consistent with the CLI), with a `FUSION_HOME` override.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-12 21:51:43 -07:00
parent 199990bd5a
commit 20aad563f6

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Fix "Couldn't start local Fusion" on the Linux AppImage (and any packaged build launched from a desktop launcher). The embedded local runtime now roots its data at the user's home directory (`~/.fusion`) instead of `process.cwd()`, which was `/` or the read-only AppImage mount point and caused database creation to fail with EACCES/EROFS. Set `FUSION_HOME` to override the location.