Skip to content

Start the fake server through a symlink or a path with a space. - #1274

Merged
calledtoconstruct merged 1 commit into
MyOwnDataCenter:mainfrom
calledtoconstruct:fix/fake-direct-run
Dec 5, 2026
Merged

calledtoconstruct merged 1 commit into
MyOwnDataCenter:mainfrom
calledtoconstruct:fix/fake-direct-run

Conversation

@calledtoconstruct

@calledtoconstruct calledtoconstruct commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

node test/fake-omarchyd.mjs starts when the checkout path contains a space or is reached through a symlink. Before, that comparison failed and the process exited 0 with no output. The helper already had this fix.

Fixes #618.

How you tested it

  • npm run typecheck, npm run build and npm test pass
  • Tried on a real Omarchy machine or VM (say which), if it touches install.sh, the helper, apps, machines or storage

test/fake-direct-run.test.mjs and test/helper-disk-safety.test.mjs passed (6 tests). The new test starts the fake server through a symlink and through a directory named "sp ace", then stops it. Full npm test, typecheck, and build were not run. This does not change the helper.

Anything to know

Version and What's New are unchanged.


Note

Low Risk
Test-only fake server and a new integration test; no production app, helper, or install path changes.

Overview
Fixes standalone startup of test/fake-omarchyd.mjs when you invoke it through a symlink or a path that contains a space. The old import.meta.url === file://${process.argv[1]} check often failed (silent exit 0), so node test/fake-omarchyd.mjs never booted the test server in those layouts.

Detection now goes through a ranAsMain() helper (preferring import.meta.main when present, otherwise comparing realpathSync of process.argv[1] to the script’s resolved path via fileURLToPath(import.meta.url)), matching the approach already used in the helper.

Adds test/fake-direct-run.test.mjs, which spawns the fake through a symlink and through a directory named sp ace and asserts the expected startup line is printed.

Reviewed by Cursor Bugbot for commit 6739abf. Bugbot is set up for automated code reviews on this repo. Configure here.

The direct-run check compared a percent-encoded URL with the path as typed, so a checkout in a folder with a space, or reached through a symlink, exited 0 and printed nothing. The helper already resolves the real path. The stand-in backend now does the same.

Fixes MyOwnDataCenter#618

Co-Authored-By: Grok 4.7
@calledtoconstruct
calledtoconstruct merged commit c77f089 into MyOwnDataCenter:main Dec 5, 2026
2 checks passed
@calledtoconstruct

Copy link
Copy Markdown
Collaborator Author

Thank you @nixfred. The fake server now starts through a symlink or a path with a space. The helper already did. Merged.

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.

Direct-run checks in helper.mjs and fake-omarchyd.mjs do nothing via a symlink or a path with a space

1 participant