Comments (11)
this issue is related to chef client 17.9.18
from homebrew.
@chadjiang so how did you resolve the issue? Running into it myself using chef client 17.9.26
from homebrew.
We're experiencing the same issue, using Chef client 17.9.26, though its release notes mention that it fixes exactly this issue (present in 17.9.18).
The release notes thank @jweyer8 for fixing it. What might we be doing wrong, Jared?
from homebrew.
Running Chef client 17.9.26 seems to have fixed the issue for us.
The homebrew_tap resource was trying to reference the 'full' property which was removed in v17.9.18 #12346. Below is the line that was causing the issue:
shell_out!("#{new_resource.homebrew_path} tap #{new_resource.full ? "--full" : ""} #{new_resource.tap_name} #{new_resource.url || ""}",
The fix was as simple as removing the reference to 'new_resource.full' which was causing the no method error due to the fact that the property was removed (The full property was removed by Chef because the --full option was depreciated by Homebrew).
from homebrew.
Chef client 17.9.26 fixed --full issue. but the issue i got before I cannot do brew installl package for ARM64 (m1) machine, the brew installation path in the node is /opt/homebrew,
in the node , /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.9.26/lib/chef:
resource/homebrew_tap.rb
resource/homebrew_cask.rb
mixin/homebrew_user.rb.
provider/package/homebrew.rb
those file use /usr/local/Homebrew
for brew. I have to update them in the node to make installation work.
from homebrew.
Have you tried specifying the install path with the homebrew_path property?
To use your example, would the following fix your issue:
homebrew_cask 'Install Chrome' do
cask_name 'google-chrome'
homebrew_path '/opt/homebrew/bin/brew'
end
from homebrew.
@jweyer8
ha, good to know. I did not realize this :homebrew_path parameter. Thanks a lot!
from homebrew.
@chadjiang
No problem!
from homebrew.
oh, that looks interesting, will try on Monday if that solved our issue!
from homebrew.
I needed to apply two changes:
- even though homebrew got installed, it didn't get added to the path, leading homebrew_user.rb to fail.
I fixed it by adding the following lines to my default.rb:
include_recipe 'homebrew'
ENV['PATH']="#{ENV['PATH']}:/opt/homebrew/bin:/opt/homebrew/sbin"
- Even though it's now part of the path, all
homebrew_cask
,homebrew_tap
require settinghomebrew_path
.
Note: Just doing 2.) is not enough because homebrew_user.rb will still fail.
from homebrew.
Weirdly enough, homebrew_package
/ package
does not have a homebrew_path and is working just fine
from homebrew.
Related Issues (20)
- brew install fails because sudo chef-client HOT 3
- Travis build hasn't been green for 9+ months HOT 4
- Cookbook-provided package provider still used on Chef 12 HOT 2
- Analytics shell_out breaks chefspec HOT 2
- Wrap buo/cask-upgrade to allow for updating/upgrading casks. HOT 1
- uninitialized constant Chef::Resource::HomebrewTap Chef 13.0.118 HOT 3
- Installing android-studio-canary HOT 2
- Package resources crash Chef 13.2 HOT 5
- Enable retries for downloading homebrew go. HOT 1
- Installing casks from a URL HOT 3
- Cask resource seems to fail to compile on some non-darwin machine HOT 2
- node["homebrew"]["user"] validation fails on non OSX hosts HOT 8
- Error executing action `create` on resource 'template[/etc/profile.d/jdk.sh]' HOT 1
- Ruby Homebrew installer is now deprecated and should be migrated to Bash HOT 3
- "brew cask list" no longer supported HOT 2
- Support arm64 install of Homebrew
- undefined method `full' for Chef::Resource::HomebrewTap HOT 3
- Dependency Dashboard
- undefined method `which' for #<HomebrewUserWrapper:0x000000010b9f6a58> HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew.