The `file(1)` shipped on macOS doesn't resolve symlinks:
$ echo foo > file
$ ln -s file link
$ /usr/bin/file link
link: ASCII text
Unfortunately the `readlink(1)` on macOS doesn't support the `-f` flag as well,
so we just match against the end of the string.