Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing --appdir is throwing "Error: wrong constant name" #3813

Closed
SableRaf opened this issue Apr 7, 2014 · 9 comments
Closed

Changing --appdir is throwing "Error: wrong constant name" #3813

SableRaf opened this issue Apr 7, 2014 · 9 comments

Comments

@SableRaf
Copy link

SableRaf commented Apr 7, 2014

$ brew cask --appdir=/Applications
Error: wrong constant name --appdir=/applications

$ brew cask --version
0.9.5

@SableRaf SableRaf closed this as completed Apr 7, 2014
@SableRaf
Copy link
Author

SableRaf commented Apr 7, 2014

I guess I should learn to read the manual. Nevermind :)

@ELLIOTTCABLE
Copy link
Contributor

I'm having the same trouble; and I've literally copy-pasted this command from the README, leaving me unsure how I could “read the manual” any better.

¿Ayudarme? /=

@chrischernoff
Copy link
Contributor

I'm actually curious about this as well. I set up the environment variable in my .bash_profile and that gets picked up okay. However I wanted to add brew cask --appdir=/Applications to a bootstrap script of mine for future use, but it returns Error: wrong constant name --appdir=/applications

@SableRaf
Copy link
Author

@ELLIOTTCABLE: You need to add the following line to your .bash_profile (or .zshenv if you use zshell):

export HOMEBREW_CASK_OPTS="--appdir=/Applications --caskroom=/etc/Caskroom"

Read the end of https://github.com/caskroom/homebrew-cask/blob/master/USAGE.md#options for more info.

@chrischernoff : This line of the readme is a bit misleading

brew cask accepts a number of options

Actually --appdir is not an option of brew cask itself but of brew cask install (as far as I understand). Your script should either set the environment variable or call --appdir=/applications for every install e.g. $ brew cask install --appdir="~/Applications" google-chrome

@vitorgalvao
Copy link
Member

That is correct, @SableRaf.

I’ve proposed a small change in light of the confusion. What do you all think, is it clearer?

@chrischernoff
Copy link
Contributor

That definitely helps @vitorgalvao. Although it does make me wonder if it would be useful for homebrew-cask to have its own config file. One could set options like --appdir via brew cask --appdir/"somewhere" and it would get written to something like .caskrc rather than having to add a line to .bash_profile / .bashrc.

@vitorgalvao
Copy link
Member

The idea has been mentioned before. I don’t think anyone opposes it (on the contrary). Care to open an issue with the suggestion?

@ELLIOTTCABLE
Copy link
Contributor

Why does it need to be a separate configuration file? Can we attach it somehow to the Homebrew configuration? (=

@alebcay
Copy link
Member

alebcay commented May 13, 2014

Does Homebrew even have a configuration file?

@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants