sous-chefs / homebrew

Development repository for the homebrew cookbook
https://supermarket.chef.io/cookbooks/homebrew
Apache License 2.0
152 stars 136 forks source link

undefined method `casked' for nil:NilClass #81

Closed bcg62 closed 8 years ago

bcg62 commented 8 years ago

Having trouble using the cask lwrp - guessing something broke with the recent version update

================================================================================
      Error executing action `run` on resource 'execute[installing cask iterm2]'
      ================================================================================

      NoMethodError
      -------------
      undefined method `casked' for nil:NilClass

      Cookbook Trace:
      ---------------
      /var/folders/7f/9lj81yv94xb8p9_n7fntfn34xs6f50/T/cookbooks.9Fro95aW/site-cookbooks/homebrew/providers/cask.rb:40:in `block (3 levels) in class_from_file'

      Resource Declaration:
      ---------------------
      # In /var/folders/7f/9lj81yv94xb8p9_n7fntfn34xs6f50/T/cookbooks.9Fro95aW/site-cookbooks/homebrew/providers/cask.rb

       37:   execute "installing cask #{new_resource.name}" do
       38:     command "/usr/local/bin/brew cask install #{new_resource.name} #{new_resource.options}"
       39:     user homebrew_owner
       40:     not_if { @cask.casked }
       41:   end
       42: end
tas50 commented 8 years ago

This has been fixed in the 2.0.1 release.