tfenv icon indicating copy to clipboard operation
tfenv copied to clipboard

Don't assume brew is available in the system

Open davidmh opened this issue 11 months ago • 3 comments

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.

davidmh avatar Feb 23 '25 21:02 davidmh

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.

Zordrak avatar Jul 04 '25 13:07 Zordrak

Hey @Zordrak, I think I've fixed the issue, see the commit message for the details.

davidmh avatar Jul 04 '25 21:07 davidmh

@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

davidmh avatar Jul 14 '25 19:07 davidmh