After updating to macOS Sierra around two weeks ago, my developer machine seemed seemingly unscathed (to my surprise).

Today, however, I ran into an issue that was most likely caused by the update. I installed ctags using brew install ctags and tried to create a tags file by running ctags -R only to be greeted with the following message:

/Library/Developer/CommandLineTools/usr/bin/ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...

One of the reasons I use Homebrew to install ctags, and not the one that comes with macOS, is because generating tags recursively will create an error like the one above.

This is strange, since I had just successfully installed the Homebrew version — which is much newer and does work.

brew doctor to the rescue.

⇒  brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

Warning: Broken symlinks were found. Remove them with `brew prune`:
  /usr/local/bin/apm
  /usr/local/bin/atom
  /usr/local/share/man/man8/prlexec.8

Sometime in between my update to Sierra and now (or maybe accidentally while editing my .zshrc), /usr/local/sbin — which Homebrew uses to run its binaries — seemed to have been removed from my $PATH.

The doctor also kindly warned me of broken symbolic links which were still loitering around on my machine.

The command echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc fixed all my issues, and brew prune removed some broken symbolic links.

If, in the future, you get an odd output to your console — along the lines of /Library/Developer/CommandLineTools/usr/bin/<binary> — then sbin may have been potentially removed from your $PATH.

Run brew doctor and make sure to get a prescription, it’ll most likely fix your issue.