Skip to content
This repository has been archived by the owner on May 22, 2018. It is now read-only.

Add --binarydir to brewcask install_options #127

Merged
merged 1 commit into from
Feb 20, 2015
Merged

Add --binarydir to brewcask install_options #127

merged 1 commit into from
Feb 20, 2015

Conversation

sebroeder
Copy link
Contributor

This is the PR for the problem I originally mentioned in the discussion of PR119.

I run into a small problem when I wanted to install Textmate:

boxen::personal::osx_apps:
  - textmate
Error: Execution of 'brew cask install textmate --appdir=/Applications' returned 1: ==> Downloading https://api.textmate.org/downloads/release
==> Symlinking App 'TextMate.app' to '/Applications/TextMate.app'
Error: Permission denied - /usr/local
==> Symlinking Binary 'mate' to '/usr/local/bin/mate'

The Textmate cask tries to symlink a helper binary to /usr/local/bin/mate. Since Boxen does not touch /usr/local by default the permissions are wrong and /usr/local/bin does not even exist.

As far as I can tell, we should install the helper into /opt/boxen/homebrew/bin instead. According to https://github.com/caskroom/homebrew-cask/blob/master/USAGE.md the corresponding brew cask option is --binarydir=/opt/boxen/homebrew/bin.

I tested my changes by unistalling Textmate manually with brew cask uninstall textmate, deleting the Puppetfile.lock, replacing the puppet-boxen module in the Puppetfile with my local fork and running script/boxen again. This time Textmate installed without a problem and mate is symlinked as /opt/boxen/homebrew/bin/mate as expected.

@radeksimko
Copy link
Contributor

Although it's a good idea to have this option in boxen and be able to change it, it's actually a bug in brewcask: Homebrew/homebrew-cask#7750

@sebroeder
Copy link
Contributor Author

Although it's a good idea to have this option in boxen and be able to change it, it's actually a bug in brewcask: Homebrew/homebrew-cask#7750

I agree that is a bug in homebrew-cask, too. But I think this PR still stands, since boxen by default tries to be self-contained in /opt/boxen (instead of /usr/local like the non-boxen homebrew). It should try to be consistent in my opinion and and not put stuff in both /usr/local and /opt/boxen.

@radeksimko
Copy link
Contributor

It should try to be consistent in my opinion and and not put stuff in both /usr/local and /opt/boxen.

I did not say this PR is invalid, I actually agree that it stands 😃

See Homebrew/homebrew-cask#7750 (comment) for some reasons/details why brewcask uses that path and generally use that thread there to discuss any suggestions regarding brewcask.

rafaelfranca added a commit that referenced this pull request Feb 20, 2015
…arydir

Add --binarydir to brewcask install_options
@rafaelfranca rafaelfranca merged commit 91ecd6f into boxen:master Feb 20, 2015
@sebroeder
Copy link
Contributor Author

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants