readlink: illegal option -- f
Closed this issue · 4 comments
fantouch commented
$ git-worktree-relative -r ./my-repo -d
readlink: illegal option -- f
usage: readlink [-n] [file ...]
Kristian-Tan commented
After quick googling, it seems that this issue occurs only on macOS. Is that true? Are you using macOS @fantouch ?
Kristian-Tan commented
On macOS, you may try methods suggested here:
https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac
Easiest one is on this answer https://stackoverflow.com/a/59938967/3706717
Or this answer https://stackoverflow.com/a/56219990/3706717
brew install coreutils
ln -s /usr/local/bin/greadlink /usr/local/bin/readlink
I will add this to README.md if you confirmed that it solves this issue
fantouch commented
Yes macOS, thanks the suggestion works
Kristian-Tan commented
I've added this solution in README.md
https://github.com/Kristian-Tan/git-worktree-relative/blob/master/README.md#installation-on-macos