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

Ville Rahikka 1 Reputation point
2021-08-17T09:49:04.933+00:00

Hi,

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:

/Library/Frameworks/Mono.framework/Commands:/Applications/Visual Studio.app/Contents/Resources:/Applications/Visual Studio.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:~/.dotnet/tools:/usr/local/share/dotnet

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