Closed nkoson closed 2 years ago
See the logic here: https://github.com/facebook/watchman/blob/main/watchman/main.cpp#L471
If you want a different PATH, I would recommend setting the subprocess_path_env config.
The reason why Watchman uses a consistent PATH is because if it's daemonized in some arbitrary context, the PATH variable of the process spawning Watchman may not be what you want easier, and it's quite confusing to debug in practice.
I'm going to mark this closed, but let me know if subprocess_path_env doesn't work for you.
Using watchman 2022.03.21.00 installed via homebrew on osx 11.6.5, processes triggered by watchman have a different
PATH
than the ones launched from the user shell. This is unfortunate, because now watchman runs binaries from/usr/bin
instead of/usr/local/bin
(which have swapped places in the twoPATH
s mentioned above).Upon startup, watchman writes
~/Library/LaunchAgents/com.github.facebook.watchman.plist
in which the incorrectPATH
is shown. Where is this coming from? Overwriting the file does not help since watchman rewrites it on every startup.I would like to see
env
display the samePATH
regardless whether it was run from the user shell or by watchman.