Skip to content

fix: use absolute paths for bin/ symlinks#21

Merged
clawdeeo merged 1 commit intomainfrom
fix/symlink-absolute-path
Apr 22, 2026
Merged

fix: use absolute paths for bin/ symlinks#21
clawdeeo merged 1 commit intomainfrom
fix/symlink-absolute-path

Conversation

@clawdeeo
Copy link
Copy Markdown
Collaborator

Problem

Symlinks in bin/ used relative paths:

bin/ripgrep -> packages/BurntSushi/ripgrep/ripgrep-15.1.0-x86_64-unknown-linux-musl/rg

This breaks when the symlink is called from a different working directory.

Solution

Use std::fs::canonicalize to resolve absolute paths before creating symlinks:

bin/ripgrep -> /home/user/.gitclaw/packages/BurntSushi/ripgrep/ripgrep-15.1.0-x86_64-unknown-linux-musl/rg

Testing

Before: Symlink breaks when called from outside ~/.gitclaw
After: Symlink works from any directory

Symlinks in bin/ were using relative paths:
  bin/ripgrep -> packages/BurntSushi/ripgrep/.../rg

This breaks when calling from different directories.

Now using std::fs::canonicalize to resolve absolute paths:
  bin/ripgrep -> /home/user/.gitclaw/packages/BurntSushi/ripgrep/.../rg

Fixes symlink resolution from any working directory.
@clawdeeo clawdeeo merged commit 3ac90a8 into main Apr 22, 2026
8 checks passed
@clawdeeo clawdeeo deleted the fix/symlink-absolute-path branch April 22, 2026 10:17
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