Giter VIP home page Giter VIP logo

Comments (11)

chadjiang avatar chadjiang commented on June 4, 2024

this issue is related to chef client 17.9.18

from homebrew.

RockLobster avatar RockLobster commented on June 4, 2024

@chadjiang so how did you resolve the issue? Running into it myself using chef client 17.9.26

from homebrew.

phirk avatar phirk commented on June 4, 2024

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.

jweyer8 avatar jweyer8 commented on June 4, 2024

@RockLobster @chadjiang

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.

chadjiang avatar chadjiang commented on June 4, 2024

@RockLobster @jweyer8 @phirk

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.

jweyer8 avatar jweyer8 commented on June 4, 2024

@chadjiang

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.

chadjiang avatar chadjiang commented on June 4, 2024

@jweyer8
ha, good to know. I did not realize this :homebrew_path parameter. Thanks a lot!

from homebrew.

jweyer8 avatar jweyer8 commented on June 4, 2024

@chadjiang
No problem!

from homebrew.

RockLobster avatar RockLobster commented on June 4, 2024

oh, that looks interesting, will try on Monday if that solved our issue!

from homebrew.

RockLobster avatar RockLobster commented on June 4, 2024

I needed to apply two changes:

  1. 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"
  1. Even though it's now part of the path, all homebrew_cask, homebrew_tap require setting homebrew_path.

Note: Just doing 2.) is not enough because homebrew_user.rb will still fail.

from homebrew.

RockLobster avatar RockLobster commented on June 4, 2024

Weirdly enough, homebrew_package / package does not have a homebrew_path and is working just fine

from homebrew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.