Conversation
| def install | ||
| install_cmd = ['brew'] | ||
| if install_options.any? | ||
| execute ["brew", "install", "Caskroom/cask/#{resource[:name]}", *install_options].flatten, command_opts |
| end | ||
|
|
||
| def self.current(name) | ||
| caskdir = Pathname.new "#{caskroom}/#{name}" |
There was a problem hiding this comment.
This needs to stay as double quotes otherwise it won't be evaluated and interpolated correctly.
| end | ||
|
|
||
| def self.new_caskroom | ||
| @new_caskroom ||= Pathname.new("#{home}/Caskroom") |
There was a problem hiding this comment.
This needs to stay as double quotes otherwise it won't be evaluated and interpolated correctly.
| execute ["brew", "boxen-install", "Caskroom/cask/#{resource[:name]}"], command_opts | ||
| install_cmd << 'boxen-cask-install' | ||
| end | ||
| install_cmd << install_options if install_options.any? |
There was a problem hiding this comment.
This line should be able to go under the existing if install_options.any? a couple of lines up. Should become something like this and save the extra inline expression:
def install
install_cmd = ['brew']
if install_options.any?
install_cmd << 'cask install'
install_cmd << install_options
else
install_cmd << 'boxen-cask-install'
end
install_cmd << resource[:name]
execute install_cmd.flatten, command_opts
end| - `homebrew`, >= 1.10.0 | ||
| - `homebrew` >= 1.10.0 | ||
|
|
||
| ## Work in progress |
There was a problem hiding this comment.
I know this wasn't you but can you delete this section? I don't think it really adds any value or information.
|
Running this patch locally now to see how we go! |
|
Getting some better (actually installing!) but not great behaviour. It looks like once it's installed a package, the next run fails with this message. I think this might be Homebrew though... |
|
@jacobbednarz Thanks for local test! My local environment manifest is bellow, It's working. Are you manually installing |
|
|
||
| it 'should return install command' do | ||
| expect{ @provider.install }.to raise_error(Puppet::ExecutionFailure, | ||
| /brew boxen-cask-install cask/) |
There was a problem hiding this comment.
brew command is failed, so I check exception message command name.
|
Nope, I'm all Boxen hiera configuration. I do occasionally get the following error which might be something underlying in Homebrew that isn't quite working as expected. Which is very annoying considering this is a freshly out of the box machine 😞 |
|
I've done a bit of wiping/re-Homebrewing here and this all looks good now. Once the specs are 💚 I'm happy to merge. |
|
@jacobbednarz CI is now passed. (I add my GITHUB_API_TOKEN environment) I changed travis os is osx, But osx is too slow CI. I'll fix boxen gem, And travis os revert to linux, Thanks. |
|
@jacobbednarz Could you add GITHUB_API_TOKEN? Master CI is failed.. |
|
I don't think we need to change the OS this runs on since the specs aren't doing anything OSX specific - it's just rspec for the puppet classes. I think we hit the rate limiting issue since we were running so many builds yesterday and before I look at adding a GitHub token, I'd like to see how often it comes up because this repository is pretty slow moving. |
|
I've updated the CI OS options via 3ab67cd so now we've just gotta look at https://travis-ci.org/boxen/puppet-brewcask/builds/308649030#L595 |
|
I'll find out brewcask defined type |
|
Do use calling facter on CI? 🤔 |
|
Could you waiting for merge PR? |
|
(ref) boxen/boxen#219 |
|
boxen 3.1.1 has been released. |
|
@n0ts are you interested in finishing this one up? |
|
@jacobbednarz Thanks for ping. Could you new release cardboard (inside boxen gem version 3.1.1)? |
|
@n0ts do you mean like boxen/cardboard#19? If that's correct I'll release that. |
|
@jacobbednarz Yes, It's correct. |
|
Done! 2.1.1 is released https://rubygems.org/gems/cardboard/versions/2.1.1 |
|
@jacobbednarz Thanks for new cardboard release! CI is passed! Thanks! |
|
@jacobbednarz Could you merge it? I'll send you next pr support |
| mode => '0755', | ||
| } | ||
|
|
||
| homebrew::tap { 'caskroom/cask': } |
There was a problem hiding this comment.
Is this really required? This seems odd that it's never broke before?

Hello, brew install Caskroom/versions/google-chrome-canary is not working.
And my custom cask is not installing via puppet-brewcask module.
So I add brew custom install command
brew boxen-cask-install <cask>.Thanks,