Skip to content

Commit

Permalink
test8
Browse files Browse the repository at this point in the history
Signed-off-by: Corey Hemminger <[email protected]>
  • Loading branch information
Stromweld committed Jan 20, 2025
1 parent 1561402 commit b37df3d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,22 @@
# limitations under the License.
#

# class HomebrewUserWrapper
# require 'chef/mixin/homebrew'
# include Chef::Mixin::Homebrew
# # require Chef::VERSION >= Chef::Version.new('18.6.2') ? 'chef/mixin/homebrew' : 'chef/mixin/homebrew_user'
# # include Chef::VERSION >= Chef::Version.new('18.6.2') ? Chef::Mixin::Homebrew : Chef::Mixin::HomebrewUser
# include Chef::Mixin::Which
# end

module HomebrewHelper
class HomebrewUserWrapper
require 'chef/mixin/homebrew'
include Chef::Mixin::Homebrew
# require Chef::VERSION >= Chef::Version.new('18.6.2') ? 'chef/mixin/homebrew' : 'chef/mixin/homebrew_user'
# include Chef::VERSION >= Chef::Version.new('18.6.2') ? Chef::Mixin::Homebrew : Chef::Mixin::HomebrewUser
include Chef::Mixin::Which
end

module Homebrew
extend self

require 'mixlib/shellout'
include Chef::Mixin::ShellOut

def self.included(base)
base.extend(HomebrewHelper)
base.extend(Homebrew)
end

def install_path
Expand Down Expand Up @@ -94,7 +93,7 @@ def sudo_user
def current_user
ENV['USER']
end
end # unless defined?(Homebrew)
end unless defined?(Homebrew)

class HomebrewWrapper
include HomebrewHelper
Expand Down
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# limitations under the License.
#

unless HomebrewHelper.exist?
unless Homebrew.exist?
homebrew_go = "#{Chef::Config[:file_cache_path]}/homebrew_go"

# Grant Homebrew install script permission to execute
Expand Down

0 comments on commit b37df3d

Please sign in to comment.