2

I am writing a script to setup a mac development environment, however I am running into an issue on some peoples macs where cask does not install. Is there a way I can verify if cask has been installed in bash?

Ideally I am looking for something like:

if caskIsInstalled then
     # do stuff...
fi
  • 1
    Does this help? – Arthur Oct 13 '15 at 11:05
  • @ArthurHammer A bit, but it did not take me far enough. – Mike Rylander Oct 13 '15 at 15:25
2

I ended up asking this on stackoverflow, where I was able to come up with this.

if ! brew info cask &>/dev/null; then
  echo "Failed to install Cask (Homebrew Extension)"
  exit 1
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .