MacOS Catalina Upgrade, Why Won't My Tools Run?

MacOS Catalina Upgrade, Why Won't My Tools Run?

by Jason Lewis on Nov 16, 2019

SITE NAME CHANGE: Hi there, this is just a quick note to explain why the site name seems to have changed. I've decided that my personal domain of Gecko8 wasn't nearly descriptive enough. I want to cover not just code, but how to make our lives better as developers. With that goal in mind, I feel Life And Code is a better choice. I hope you agree!

As mentioned in my recent post Relocated Files, What's Up Catalina?, my upgrade to MacOS Catalina (MacOS 10.15) went less than smoothly. One of the problems is that after the upgrade, one of my important client projects built on Rust refused to build and run properly. After several hours of digging around, I finally found the cause. That's what this post is all about, hopefully saving you those hours of investigation.

Bash to Zsh

Terminal symbol

Likely one of the most important changes for developers in the Catalina update is that Bash is no longer the default terminal client. Apple has changed to Zsh.

Why You Ask?

It's not really due to Zsh having cool new features or anything so obvious. It actually comes down to licensing. Until now MacOS has used a really old version of the GNU Bash shell. This is because the versions after that were licensed under the GNU Public License, or GPLv3 to be specific. That license has a lot of restrictions that caused issues for Apple, hence why they stuck with the old version. Zsh on the other handle, is licensed under the much more open MIT license, making it much easier to deal with.

For a more detailed description of the licensing, check out this easy to read post: Why does macOS Catalina use Zsh instead of Bash? Licensing.

Why is This Causing Issues?

The issue is simple, Zsh doesn't use the same configuration/startup files as Bash. That means all the startup scripts that have been added over the years will no longer run when you open the terminal. So all your paths, etc. won't be configured, resulting in tools not being found or not working properly. In my case this is exactly what happened, pieces of the Rust compiler could no longer be found which resulted in the project not building properly. Fortunately, fixing this is pretty easy once you know how.

Quick Tip: All these configuration files will be hidden by default. The easiest way to see them in the Finder is to tap "⌘⇧." To hide them again after, just tap "⌘⇧." again.

Step 1: .profile File

Simply copy the contents of ~/.profile to the ~/.zprofile file.

Step 2: .bash_profile File

Copy the contents of ~/.bash_profile to the ~/.zshrc file.

For me, that's all I had to do. Let me know in the comments if there are any other files you had to change.