Closed sidho closed 8 years ago
So the pull request I just opened has a change that likely fixes this, but I'm having some trouble running the recipe locally on my machine. Wondering if @wendorf has any thoughts. The stacktrace suggests that the problem is in the chef homebrew code itself.
If I run:
% soloist run_recipe sprout-jetbrains-editors::intellij_ce
I see a NoMethodError
from the chef code for homebrew:
NoMethodError
-------------
execute[installing cask caskroom/versions/intellij-idea-ce] (/Users/rukednous/workspace/sprout-jetbrains-editors/cookbooks/homebrew/providers/cask.rb line 31) had an error: NoMethodError: undefined method `shell_out' for Chef::Resource::HomebrewCask
Cookbook Trace:
---------------
/Users/rukednous/workspace/sprout-jetbrains-editors/cookbooks/homebrew/resources/cask.rb:13:in `casked?'
/Users/rukednous/workspace/sprout-jetbrains-editors/cookbooks/homebrew/providers/cask.rb:34:in `block (3 levels) in class_from_file'
Resource Declaration:
---------------------
# In /Users/rukednous/workspace/sprout-jetbrains-editors/cookbooks/sprout-jetbrains-editors/recipes/intellij_ce.rb
1: homebrew_cask 'caskroom/versions/intellij-idea-ce'
2: sprout_jetbrains_editors_pivotal_preferences 'intellijcommunity'
@LukeWinikates,
That looks like a strange error (and different than the one I encounter when I try to run it). shell_out
should be available, and I can confirm that by trying to homebrew_cask 'intellij-idea-ce'
, which succeeds for me. It could be that your bundle is out of date. Can you give that a shot?
Indeed, bundle update
got rid of that error. I updated the pull request based on @wendorf 's comments. I see some value in having an integration test, or perhaps something in the test suite that verifies that anything we try to install from homebrew still exists. That might be a chore for another day when I have an OSX vm handy.
I do still get an error from homebrew myself, even with caskroom/verisons
tapped:
% brew update
% brew cask install intellij-idea-ce
Error: Cask 'intellij-idea-ce' definition is invalid: Bad header line: parse failed
I believe that particular error occurs if you still have the "old" homebrew-cask from before it was bundled with normal homebrew. The recommended fix from homebrew-cask:
Important December update: Homebrew-Cask will now be kept up to date together with Homebrew (see #15381 for details). If you haven’t yet, run
brew uninstall --force brew-cask; brew update
to switch to the new system.
To note: If you are running a sprout-wrap that still uses the (soon-to-be) deprecated sprout-homebrew::* recipes, you may find yourself repeatedly in the position of needing to uninstall brew-cask. Migrating to Chef's homebrew cookbook as outlined in this commit is recommended.
I see -- sounds like that's an issue specific to the machine I'm testing on. brew uninstall --force brew-cask; brew update
makes that go away. That suggests that the updated pull request should work end-to-end. I can try that on a clean vm later, or if somebody else wants to give it a spin and verify that it's safe to merge, then we could close this issue out for @sidho and others.
Looks good to me. Thanks!
Hi Luke,
The recipe
sprout-jetbrains-editors::intellij_ce
fails because Homebrew is unable to find the cask when runningbrew cask install intellij-idea-ce
. Going through caskroom/versions instead and usingbrew cask install caskroom/versions/intellij-idea-ce
instead seems to work.Here is the logs if you need them:
Thanks,
Sid