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 3f88aa0 commit 46d336f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ suites:
run_list:
- recipe[build-essential]
- recipe[homebrew::default]
- recipe[homebrew::cask]
- recipe[test]
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 46d336f

Please sign in to comment.