-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
Hi @chrisconley, Thanks for the PR! I'm concerned this will be an awkward change for users who have installed homebrew prior to the change and aren't in the habit of updating. I wonder if it's valuable to update this PR to warn users who have brew-cask installed (though this warning will probably be lost in the slew of sprout output), or fail the recipe of brew-cask is installed, giving an error along the lines of "Error: brew-cask is installed, but has been moved into homebrew proper. Please uninstall brew-cask and update homebrew to resolve this error: Thoughts? If it sound reasonable, can you update the PR? Thanks, |
Hey there, I just bumped into this problem tonight, and it's preventing me from having @wendorf – please help me understand what is going on. I think we might end up with just three situations: 1. Older Brew, No Casks InstalledA user of this cookbook that has an older brew installed (in my case it was revision 78203f9c, a few weeks prior – just before installing brew-cask started throwing an error) will get the following when they try to install [~] ○ → brew install caskroom/cask/brew-cask
.......
==> Checking out tag v0.60.0
==> Caveats
You can uninstall this formula as `brew tap Caskroom/cask` is now all that's
needed to install Homebrew Cask and keep it up to date.
==> Summary
🍺 /usr/local/Cellar/brew-cask/0.60.0: 3 files, 12K, built in 5 seconds This command, I believe, succeeds, and therefore the cookbook would still work. 2. Most Recent/Updated BrewA user that has updated their brew will see the following: [~] ○ → brew update
Updated Homebrew from 78203f9c to c156facd.
Updated 4 taps (caskroom/cask, homebrew/dupes, homebrew/versions, phinze/cask).
Error: Could not link phinze/cask manpages to:
/usr/local/share/man/man1/brew-cask.1
Please delete these files and run `brew tap --repair`. After running [~] ○ → brew install caskroom/cask/brew-cask
==> Installing brew-cask from caskroom/cask
==> Cloning https://github.com/caskroom/homebrew-cask.git
Updating /Library/Caches/Homebrew/brew-cask--git
==> Checking out tag v0.60.0
Error: Empty installation
[~] ○ → echo $?
1 This is what is actually breaking this cookbook completely for anyone with a newer brew. 3. Older Brew, but Casks InstalledNow, for anyone with an older brew, but who installed any cask ever, and assuming I am reading this PR correctly, everything would still work, and they would be able to install new casks (bypassing In the very unlikely chance that they have used brew, have not yet updated, but have also never ever installed any casks, I think that this PR may prevent them from installing further additional casks until they update their brew, right? ConclusionsSo what's the way to fix that? Can we check the version of brew, and fork the logic based on older or newer brew? For newer brew it can run I'll use the fork's URL for the time being, but I would love to see any solution to appear on the master shortly. Let's discuss the best way to fix it and push it up. Thanks! |
@kigster Thanks for all your thoughts on this! I feel a little uncomfortable having branching logic for people with older versions of brew. Sprout has traditionally not done much to support cases where updating isn't desired, since there's an overhead for us to maintain recipes. I'd feel better if we just detect the broken config (e.g. you have the brew-cask recipe installed) and throw an error, letting the user resolve the issue. |
I ended up removing most of the recipes in this cookbook now that the homebrew does a better job. If anyone is still having issues with cask, please see the sprout-homebrew README for migration instructions, and manually run |
Thanks! @wendorf |
Homebrew-cask has been moved into homebrew proper. This PR removes the installation of the legacy
caskroom/cask/brew-cask
package.It also configures
/Library/Caches/Homebrew/Casks
to have ownernode['sprout']['user']
since cask installations will fail to copy cached packages into this directory if left with owner asroot
.