Skip to content

fix: canonicalize executable path before resolving resource root - #19

Merged
hishboy merged 1 commit into
tribes-protocol:mainfrom
leostelon:main
Aug 31, 2026
Merged

fix: canonicalize executable path before resolving resource root#19
hishboy merged 1 commit into
tribes-protocol:mainfrom
leostelon:main

Conversation

@leostelon

Copy link
Copy Markdown
Contributor

On macOS, std::env::current_exe() returns the symlink path (~/.chief/bin/chief) instead of the resolved target (~/.chief/versions/<v>/bin/chief). The grandparent walk from the symlink path landed on ~/.chief/ instead of the version directory, so the resources/ directory was never found.

Fix

Canonicalize the executable path before computing the resource root, so the walk starts from the real binary and lands on the correct version directory.

Testing

  • All 8 install:: unit tests pass, including the new resources_are_found_when_the_binary_is_reached_through_a_symlink test
  • The installed binary at ~/.chief/bin/chief now passes the resources check and reaches the next gate (tmux)

On macOS, std::env::current_exe() returns the symlink path
(~/.chief/bin/chief) instead of the resolved target
(~/.chief/versions/<v>/bin/chief). The grandparent walk from the
symlink path landed on ~/.chief/ instead of the version directory,
so the resources/ directory was never found.

Canonicalize the executable path before computing the resource root
so the walk starts from the real binary and lands on the correct
version directory.
@leostelon
leostelon requested a review from hishboy as a code owner August 31, 2026 10:31
@hishboy
hishboy merged commit 7e65c35 into tribes-protocol:main Aug 31, 2026
34 checks passed
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