mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
This is a feature of GNU readlink that isn't in the BSD readlink found on macOS. For using this and other GNU coreutils features in our scripts in general, we could use a solution like mobile's tools/lib/ensure-coreutils.sh to get GNU coreutils on the PATH -- check if it's there already, if not then try to find a Homebrew install of it and use that, if not then print a helpful message. But even then there'd be a bootstrapping problem of how to find ensure-coreutils.sh . That involves exactly the same problem as we have for finding git-tools.sh in these lines. So in fact in mobile for the task of finding ensure-coreutils.sh in the first place, we do without `readlink -f` anyway. The one consequence of this behavior-wise is that if you make a symlink somewhere that points directly at that script (say in your `~/bin/`), and try to run it using that symlink, it won't work. (It'll still work just fine if there are symlinks somewhere higher up in the paths involved -- just not for the script itself.) An ideal CLI program really should support that, I think, but lacking a better idea, this seems an acceptable compromise.
1.6 KiB
Executable File
1.6 KiB
Executable File