question

VilleRahikka-9173 avatar image
0 Votes"
VilleRahikka-9173 asked RobCaplan edited

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

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!

vs-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers