Closed bompstable closed 6 years ago
Can you not symlink to the directory instead of the script itself? Then add that directory to the PATH?
E.g.
# ls
adr-tools-2.1.0
# ln -s adr-tools-2.1.0/src adr-tools-current
# adr-tools-current/adr
usage: adr help COMMAND [ARG] ...
...
# export PATH=$PATH:$PWD/adr-tools-current
# adr
usage: adr help COMMAND [ARG] ...
...
This way there are no difficulties with reading the target of a symlink on different platforms.
There is a workaround and this PR breaks tests, so I'm closing it for now.
adr fails when invoked as a symlink. For example:
This PR adds a test for this that fails then fixes the issue.