kolide / launcher

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

`homebrew` table should not error when homebrew isn't installed #1864

Closed directionless closed 1 month ago

directionless commented 1 month ago

I was perusing bugsnag, and I noticed we have a lot of errors because the homebrew table can't find homebew.

error generating table: failure allocating allowedcmd.Brew: homebrew not found

and

error generating table: failure allocating allowedcmd.Brew: not found: /home/linuxbrew/.linuxbrew/bin/brew

This is coming from https://github.com/kolide/launcher/blob/766d939df65f7584e5fe8aedfc288d00efc610fc/ee/tables/homebrew/upgradeable.go#L45-L48

For this table, I think we should identify that error, and return no results.

Digging in slightly, it seems like validatedCommand should have returned a different error, so I wonder if something is slightly amiss here.

In terms of solutions, it's probably more correct to plumb a custom error.

Dharma-09 commented 1 month ago

Can I work on this issue?

directionless commented 1 month ago

@Dharma-09 Sure, you're welcome to take a try. We're likely to pick it up in the next couple weeks if it's still waiting

directionless commented 1 month ago

Fixed By https://github.com/kolide/launcher/pull/1872