boxen / our-boxen

Copy me for your team.
https://github.com/boxen/our-boxen/
MIT License
2.58k stars 884 forks source link

Where does this brew cask warning come from? #848

Closed zhenkyle closed 7 years ago

zhenkyle commented 7 years ago

I'm on a fresh new macOS 10.12.5 box with a fresh new our-boxen cloned from here and installed.

When I run any brew cask command, I got warning message like this:

$brew cask --version
Warning: Calling `brew cask` with the `--caskroom` flag is deprecated and will be disabled on 2017-10-31!
There is no replacement.
/usr/local/Library/Homebrew/cask/lib/hbc/cli/options.rb:53:in `call'

Homebrew-Cask 1.2.3
caskroom/homebrew-cask (git revision e3356; last commit 2017-06-13)

But I didn't calling brew cask with the --caskroom at all!

Does any body know where does this warning message come from? It is quite annoying.

Note: I don't have another mac box to try to install brew cask with out boxen to see if this warning message still exist. So I came here for help.

jacobbednarz commented 7 years ago

👋 thanks for reporting!

This warning comes from setting the HOMEBREW_CASK_OPTS in your environment. You can confirm this by running env | grep HOMEBREW_CASK_OPTS in a shell.

$ env | grep HOMEBREW_CASK_OPTS
HOMEBREW_CASK_OPTS=--caskroom=/opt/homebrew-cask/Caskroom

You can confirm this is the cause by running HOMEBREW_CASK_OPTS="" brew cask --version and you won't get the error.

To better integrate with upstream Homebrew and Cask, I consolidated the management (and removed this environment setting) via boxen/puppet-brewcask#50 which was later released as 0.0.9.

The reason you are still seeing this is that I have not yet updated this in the boxen/our-boxen repository because I've been running it and monitoring it on our internal fork. However, we've been on this for quite a while now without issue so it's probably fine to look at bumping to the latest.

Appreciate the nudge on this one! I'll look to get this sorted soon. Also happy if you'd like to PR this for a contribution. The docs, specifically "update your Puppet modules" section will guide you through it.

jacobbednarz commented 7 years ago

I've bumped the version in #849 so once that lands you should be all set 👍

zhenkyle commented 7 years ago

Confirmed disappearance of the warning message after pull #849, and thanks for your elaborate explanations.

Wow, there's a lot of consolidating code in boxen/puppet-brewcask#50, to be honest, I can't figure out so much in a similar PR, the credit is alway yours! Well done!