Skip to content

Commit

Permalink
fixinf chefstyle changes
Browse files Browse the repository at this point in the history
Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
  • Loading branch information
nikhil2611 committed Oct 17, 2024
1 parent 788b0d5 commit 30ed862
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions post-bundle-install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
matches = File.basename(gempath).match(/.*-[A-Fa-f0-9]{12}/)
next unless matches

%w[chef-utils chef-config].each do |gem_need_install|
%w{chef-utils chef-config}.each do |gem_need_install|
dir_path = "#{gempath}/#{gem_need_install}"
gem_name = File.basename(Dir["#{dir_path}/*.gemspec"].first, ".gemspec")
gem_name = File.basename(Dir["#{dir_path}/*.gemspec"].first, ".gemspec")
# FIXME: should strip any valid ruby platform off of the gem_name if it matches

next unless gem_name

puts "re-installing #{gem_name}..."

Dir.chdir(dir_path) do
system("gem build #{gem_name}.gemspec") or raise "gem build failed"
system("gem install #{gem_name}*.gem --conservative --minimal-deps --no-document") or raise "gem install failed"
system("gem build #{gem_name}.gemspec") or raise "gem build failed"
system("gem install #{gem_name}*.gem --conservative --minimal-deps --no-document") or raise "gem install failed"
end
end
end

0 comments on commit 30ed862

Please sign in to comment.