I followed many methods on Ask Different as to how to change the $PATH
environmental variable for GUI apps. Some of the methods may work for pre-Catalina macOS, some may work for Catalina, but none of them work for me on macOS Big Sur.
So here's the story - I installed go
to /usr/local/bin/go
with Homebrew, and VS Code cannot find it -
Methods I've tried to solve this issue:
sudo launchctl config user path "/usr/local/bin:$PATH"
, and reboot.- Edit
/etc/paths
so that it includes/usr/local/bin
, and reboot. - Other launchctl tricks.
So what's the recommended way to set env vars for GUI apps on macOS Big Sur? Any help is appreciated.
go
) within VS Code directly?launchctl setenv KEY value
doesn't work on Big Sur.