-
Notifications
You must be signed in to change notification settings - Fork 37
puppet-brewcask does not create Caskroom. "Error: Unknown command: cask" #2
Comments
Awkward! Let me take a look at this. Stupid bootstrapping problems. 😉 👢 |
So the init method is called pretty early in the stack, https://github.com/phinze/homebrew-cask/blob/master/lib/cask/cli.rb#L20-L21 but it looks like this happens even earlier than that, when homebrew is looking for a Still investigating... |
Hi Guys. I got the same error when the Caskroom directories where different in cask and in the puppet provider:
I could resolve the issue by changing the Caskroom path in the provider to Puppet uses Homebrew-casks sets the path to Are you trying to set the caskroom by environment variable as well? |
I ran into the same issue when playing around with this thing. Similarly to puppet, I simply ran a bash script using chef and I got the same error that you describe. Funny enough, simply by making sure that the homebrew executables where in the PATH fixed the issue. So I just added this to the command and it worked: export PATH="/custom/path/to/homebrew/bin:$PATH && brew cask ..." |
I guess this bug is related and we need a more general solution here boxen/puppet-vim#16 👋 |
I hit this error as well. |
Hey folks - unfortunately I'm not Boxening anymore, which means I'm not actively using this library. If anybody is interested in taking on this issue I'm happy to hand out commit rights to the project. Just ping me. 🐉 |
Seeing the same issue trying to get Cask working from an Ansible playbook update: Not a fix for this issue, but like @halo's comment, setting the task's environment path got Cask working from Ansible: - name: Cask test
environment: {PATH: '/usr/local/bin:{{ ansible_env["PATH"] }}'}
shell: brew cask install kaleidoscope --appdir=/Applications |
Thanks to @juniorz we have some progress on this in |
I can confirm that this was an issue with
and that it is fixed in the latest version
|
I'm using puppet-brewcask to replace the one-repo-per-app model for Boxen. On a fresh Boxen install I am unable to successfully install using brewcask.
Doing this:
Results in:
I believe this error is occurring because this code, which creates the Caskroom, is not being executed in the puppet-brewcask workflow:
https://github.com/phinze/homebrew-cask/blob/master/lib/cask.rb#L44
I think the solution is to provide additional brewcask initialization code in one of these two locations:
https://github.com/phinze/puppet-brewcask/blob/master/manifests/init.pp#L4
https://github.com/phinze/puppet-brewcask/blob/master/lib/puppet/provider/package/brewcask.rb#L20
Could you provide guidance on the best place/method for ensuring the Caskroom is created and that homebrew registers the "cask" external command? Thanks!
The text was updated successfully, but these errors were encountered: