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

Check if Brew is installed #1

Open
lesaff opened this issue Mar 23, 2018 · 3 comments
Open

Check if Brew is installed #1

lesaff opened this issue Mar 23, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@lesaff
Copy link

lesaff commented Mar 23, 2018

I have Brew installed already so all good, but I think it would be nice to check for Brew in case user forgot that he/she does not have Brew installed.

Something like this perhaps?

command -v brew >/dev/null 2>&1 || { echo >&2 "Installing Homebrew Now"; \
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; }

Source: https://gist.github.com/ryanmaclean/4094dfdbb13e43656c3d41eccdceae05

@jalendport jalendport self-assigned this Mar 23, 2018
@jalendport jalendport added the enhancement New feature or request label Mar 23, 2018
@jalendport
Copy link
Owner

@lesaff good call! I'm not sure though that I want it to actually perform the installation. I'd rather just let them know that switch-php requires Brew and maybe recommend the necessary commands to run.

I personally think installing Brew (or anything for that matter) without asking for the user's permission is a little unethical. But I can definitely add in a clause that if Brew isn't installed, throw an error that also includes the necessary commands to install Brew so they can copy/paste/run if they so desire.

Thanks for the first issue! 😜

@lesaff
Copy link
Author

lesaff commented Mar 23, 2018

Maybe just return Brew is not installed message to remind user? 💭

@jalendport
Copy link
Owner

Yep something along those lines sounds like the best idea 👍

@jalendport jalendport changed the title FR: Check if Brew is installed Check if Brew is installed Mar 24, 2018
@jalendport jalendport added this to the v2 milestone Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants