Skip to content

Commit

Permalink
Merge pull request #910 from donoghuc/default-gem_uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcooper committed Sep 6, 2024
2 parents a1da62b + dedd733 commit bb18b98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion configs/components/_base-rubygem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@
# in its component file rubygem-<compoment>, before the instance_eval of this file.
gem_install_options = settings["#{pkg.get_name}_gem_install_options".to_sym]
remove_older_versions = settings["#{pkg.get_name}_remove_older_versions".to_sym]
# Set a default gem_uninstall
gem_uninstall = settings[:gem_uninstall] || "#{settings[:host_gem]} uninstall --all --ignore-dependencies"
pkg.install do
steps = []
steps << "#{settings[:gem_uninstall]} #{name}" if remove_older_versions
steps << "#{gem_uninstall} #{name}" if remove_older_versions
steps << if gem_install_options.nil?
"#{settings[:gem_install]} #{name}-#{version}.gem"
else
Expand Down

0 comments on commit bb18b98

Please sign in to comment.