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.
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.
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.
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.
Simply copy the contents of ~/.profile to the ~/.zprofile 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.