Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ggrep on Mac with Homebrew #218

Merged
merged 2 commits into from
Feb 6, 2021
Merged

Conversation

smiller171
Copy link
Contributor

@smiller171 smiller171 commented Oct 22, 2020

Allow the Keybase check to work on MacOS by using ggrep.

Fixes #189
Fixes #195

@Zordrak Zordrak merged commit 6d16fa5 into tfutils:master Feb 6, 2021
@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, this would be better re-written as:

if [[ $(uname) == 'Darwin' ]] && [[ command -v brew ]]; then

Notes:

  • consistent use of [[ test construct rather than [
  • uses command -v built-in rather than which to find the command

# 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would also be better using [[, ie.:

if ! [[ command -v ggrep ]]; then

@smiller171 smiller171 deleted the patch-1 branch February 24, 2021 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

keybase pgp check not working Keybase login detection on macOS fails
3 participants