diff options
author | David RodrÃguez <[email protected]> | 2024-10-10 19:30:26 +0200 |
---|---|---|
committer | git <[email protected]> | 2024-10-10 19:46:44 +0000 |
commit | 1ad990a366a343a84c089b771be4fe6ff80b5078 () | |
tree | acfea9fa19a340e9254d57b044096bd67dcef218 /lib/rubygems | |
parent | 3d8fe462dfefec1e3af67e7beb559a0a750d4da6 (diff) |
[rubygems/rubygems] Only pristine executables for default gems
https://.com/rubygems/rubygems/commit/1cfc1d626c
-rw-r--r-- | lib/rubygems/commands/pristine_command.rb | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -137,6 +137,13 @@ extensions will be restored. specs.group_by(&:full_name_with_location).values.each do |grouped_specs| spec = grouped_specs.find {|s| !s.default_gem? } || grouped_specs.first if options.key? :skip if options[:skip].include? spec.name say "Skipped #{spec.full_name}, it was given through options" @@ -144,14 +151,14 @@ extensions will be restored. end end - unless spec.extensions.empty? || options[:extensions] || options[:only_executables] || options[:only_plugins] say "Skipped #{spec.full_name_with_location}, it needs to compile an extension" next end gem = spec.cache_file - unless File.exist?(gem) || options[:only_executables] || options[:only_plugins] require_relative "../remote_fetcher" say "Cached gem for #{spec.full_name_with_location} not found, attempting to fetch..." @@ -185,7 +192,6 @@ extensions will be restored. env_shebang: env_shebang, build_args: spec.build_args, bin_dir: bin_dir, - install_as_default: spec.default_gem?, } if options[:only_executables] @@ -202,4 +208,10 @@ extensions will be restored. say "Restored #{spec.full_name_with_location}" end end end |