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

Perform exact word match on brew + grep #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gnclmorais
Copy link

@gnclmorais gnclmorais commented Sep 27, 2020

Example: if looking for “git” and there is “git” and “gitish” on the results list, this command will complain because grep encounters more than one match. This fix makes sure it matches on the whole word.

Without this flag, I was getting more than one matches with the words git and heroku:

✦  4. Installing Homebrew formulae…
└─────────────────────────────────────────────────────○
  [↓] Installing asciinema Updating Homebrew...
✓ installed!
  [✓] fish already installed. Skipped.
twirl: line 549: test: git: unary operator expected
  [✓] git already installed. Skipped.
twirl: line 549: test: heroku-node: binary operator expected

P.S.: Thanks for this repo, super useful to set up new MacBooks! 🙌

Example: if looking for “git” and there is “git” and “gitish” on
the results list, this command will complain. This fix makes sure
it matches on the whole word.
@@ -546,7 +546,7 @@ gem_install_or_update() {
}

install_brews() {
if test ! $(brew list | grep $brew); then
if test ! $(brew list | grep -x $brew); then
Copy link
Author

Choose a reason for hiding this comment

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

More info about this option:
image

@gnclmorais
Copy link
Author

Hey @minamarkham, are you still supporting this project? I’d be happy to help as a maintainer, I really like it. 😃

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.

1 participant