Kristian-Tan/git-worktree-relative

readlink: illegal option -- f

Closed this issue · 4 comments

$ git-worktree-relative -r ./my-repo -d
readlink: illegal option -- f
usage: readlink [-n] [file ...]

After quick googling, it seems that this issue occurs only on macOS. Is that true? Are you using macOS @fantouch ?

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

Yes macOS, thanks the suggestion works