kolide / launcher

Osquery launcher, autoupdater, and packager
https://kolide.com/launcher
Other
500 stars 99 forks source link

Add brew no auto update to brew execs #1713

Closed Micah-Kolide closed 1 month ago

Micah-Kolide commented 1 month ago

Multiple homebrew commands will invoke brew update before running the command that's called. This can cause unpredictable data being returned. Adding HOMEBREW_NO_AUTO_UPDATE=1 to the exec will ensure this doesn't happen.

Micah-Kolide commented 1 month ago

Of course it was just simply setting BOTH pwd and home, not only one of them, which I would've had figured out two days ago if I just tested that as well instead of thinking that wasn't the issue since setting one or the other didn't work...

I figure there wouldn't really be a case where we want to keep root's context of PWD and HOME over the running user's, so that's why I decided to throw it in the run_as_user exec option instead of making something specific for brew.

Micah-Kolide commented 1 month ago

Brew should be fully fixed with this pr... hopefully.