How to modify $PATH envoronment variable for Visual Studio for Mac

Ville Rahikka 1 Reputation point


My issue is that I need to use yarn in my post/prebuild scripts. I migrated to new Silicon Mac and use Homebrew to install yarn. At the moment post/prebuild scripts do not work. I just get an error "command not found: yarn". My assumption is that on new Silicon Macs homebrew installs everything to /opt/homebrew/bin/ where before it was /usr/local/bin.

I printed out the $PATH in my prebuild-script and it looks like this:


So how can I add /opt/homebrew/bin/ to the $PATH? Or are there some other solutions?

Thank you!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,702 questions
0 comments No comments
{count} votes