Don't assume brew is available in the system
I'm working on a project that uses nix as a package manager through a flake file. I can add tfenv through a custom derivation, which can include the required gnugrep dependency in the definition.
But the project assumes that the GNU version would be installed with Homebrew, which might not be installed at all.
Since all we care about is that GNU grep is available, we should use grep --version instead.
Tests are failing. Might get a colleague that has a Mac to look into why if I can - but test failure needs resolving before PR can be merged.
Hey @Zordrak, I think I've fixed the issue, see the commit message for the details.
@Zordrak I mistakenly used an exit instead of a return to do the early exit in the check_dependencies function. I've verified the return does work in my fork: https://github.com/davidmh/tfenv/actions/runs/16275337735
You can see the diff here: https://github.com/tfutils/tfenv/compare/8b13235509c7521d9984c4a66f0b53262ea394de..d57fdd50b49a1c5852ce51f6f2ca1f3b15c83a60
Sorry for the thrash