Skip to content

Commit

Permalink
Fixes #59, update cask if auto-update is true
Browse files Browse the repository at this point in the history
Not having homebrew cask updated can lead to problems such as reported
in the following issues. The cask recipe should perform an update if
the auto-update attribute is true.

*
Homebrew/homebrew-cask#7946 (comment)
907
* chef-boneyard/pantry-chef-repo#9
  • Loading branch information
jtimberman committed Jan 11, 2015
1 parent 9edb520 commit 1e05d92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ platforms:
# https://github.com/timsutton/osx-vm-templates
# https://github.com/opscode/bento/blob/master/packer/macosx-10.9.json
- name: macosx-10.9
- name: macosx-10.10

suites:
- name: default
run_list:
- recipe[build-essential]
- recipe[homebrew::default]
- recipe[homebrew::cask]
attributes:
8 changes: 8 additions & 0 deletions recipes/cask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
extend(Homebrew::Mixin)
owner = homebrew_owner

homebrew_tap 'caskroom/cask'

package 'brew-cask'

execute 'update homebrew cask from github' do
user owner
command '/usr/local/bin/brew upgrade brew-cask && /usr/local/bin/brew cask cleanup || true'
only_if { node['homebrew']['auto-update'] }
end

0 comments on commit 1e05d92

Please sign in to comment.