Skip to content

Commit

Permalink
Use ggrep on Mac with Homebrew (tfutils#218)
Browse files Browse the repository at this point in the history
This should fix tfutils#189

Co-authored-by: Zordrak <[email protected]>
  • Loading branch information
smiller171 and Zordrak authored Feb 6, 2021
1 parent 548bb2c commit 6d16fa5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libexec/tfenv-install
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ download_signature() {
|| log 'error' 'SHA256SUMS signature download failed';
};

# If on MacOS with Homebrew, use GNU grep
# This allows keybase login detection to work on Mac
if [[ $(uname) == 'Darwin' ]] && [ $(which brew) ]; then
if ! [ $(which ggrep) ]; then
brew install grep;
fi
alias grep=ggrep;
fi

# Verify signature if verification mechanism (keybase, gpg, etc) is present
if [[ -f "${TFENV_ROOT}/use-gnupg" ]]; then
# GnuPG uses the user's keyring, and any web-of-trust or local signatures or
Expand Down

0 comments on commit 6d16fa5

Please sign in to comment.