Commit fb2fc38
committed
fix: resolve symlinks in bashclaw entry point for correct BASHCLAW_ROOT
When bashclaw is invoked via a symlink (e.g. ~/.local/bin/bashclaw ->
~/.bashclaw/bin/bashclaw), BASH_SOURCE[0] resolves to the symlink
location, causing BASHCLAW_ROOT to point at the wrong directory and
all lib/*.sh sources to fail.
Add _bashclaw_resolve_root() that follows symlink chains using
readlink (without -f, compatible with macOS) to find the real script
location before deriving BASHCLAW_ROOT.1 parent 4151991 commit fb2fc38
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
6 | 20 | | |
7 | 21 | | |
8 | 22 | | |
| |||
0 commit comments