зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Remove unnecessary condition
This variable can't be falsy. https://github.com/rubygems/rubygems/commit/b838f9a6f0
This commit is contained in:
Родитель
5a385677f3
Коммит
1aaeff8e36
|
@ -263,19 +263,17 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder
|
|||
# Details: https://github.com/rubygems/rubygems/issues/977#issuecomment-171544940
|
||||
tmp_dest_relative = get_relative_path(tmp_dest.clone, extension_dir)
|
||||
|
||||
if tmp_dest_relative
|
||||
full_tmp_dest = File.join(extension_dir, tmp_dest_relative)
|
||||
full_tmp_dest = File.join(extension_dir, tmp_dest_relative)
|
||||
|
||||
# TODO: remove in RubyGems 3
|
||||
if Gem.install_extension_in_lib && lib_dir
|
||||
FileUtils.mkdir_p lib_dir
|
||||
FileUtils.cp_r ext_path, lib_dir, remove_destination: true
|
||||
end
|
||||
# TODO: remove in RubyGems 3
|
||||
if Gem.install_extension_in_lib && lib_dir
|
||||
FileUtils.mkdir_p lib_dir
|
||||
FileUtils.cp_r ext_path, lib_dir, remove_destination: true
|
||||
end
|
||||
|
||||
FileUtils::Entry_.new(full_tmp_dest).traverse do |ent|
|
||||
destent = ent.class.new(dest_path, ent.rel)
|
||||
destent.exist? || FileUtils.mv(ent.path, destent.path)
|
||||
end
|
||||
FileUtils::Entry_.new(full_tmp_dest).traverse do |ent|
|
||||
destent = ent.class.new(dest_path, ent.rel)
|
||||
destent.exist? || FileUtils.mv(ent.path, destent.path)
|
||||
end
|
||||
ensure
|
||||
FileUtils.rm_rf tmp_dest if tmp_dest
|
||||
|
|
|
@ -61,21 +61,19 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
|||
|
||||
make dest_path, results, extension_dir
|
||||
|
||||
if tmp_dest_relative
|
||||
full_tmp_dest = File.join(extension_dir, tmp_dest_relative)
|
||||
full_tmp_dest = File.join(extension_dir, tmp_dest_relative)
|
||||
|
||||
# TODO remove in RubyGems 3
|
||||
if Gem.install_extension_in_lib and lib_dir
|
||||
FileUtils.mkdir_p lib_dir
|
||||
entries = Dir.entries(full_tmp_dest) - %w[. ..]
|
||||
entries = entries.map {|entry| File.join full_tmp_dest, entry }
|
||||
FileUtils.cp_r entries, lib_dir, :remove_destination => true
|
||||
end
|
||||
# TODO remove in RubyGems 3
|
||||
if Gem.install_extension_in_lib and lib_dir
|
||||
FileUtils.mkdir_p lib_dir
|
||||
entries = Dir.entries(full_tmp_dest) - %w[. ..]
|
||||
entries = entries.map {|entry| File.join full_tmp_dest, entry }
|
||||
FileUtils.cp_r entries, lib_dir, :remove_destination => true
|
||||
end
|
||||
|
||||
FileUtils::Entry_.new(full_tmp_dest).traverse do |ent|
|
||||
destent = ent.class.new(dest_path, ent.rel)
|
||||
destent.exist? or FileUtils.mv(ent.path, destent.path)
|
||||
end
|
||||
FileUtils::Entry_.new(full_tmp_dest).traverse do |ent|
|
||||
destent = ent.class.new(dest_path, ent.rel)
|
||||
destent.exist? or FileUtils.mv(ent.path, destent.path)
|
||||
end
|
||||
ensure
|
||||
ENV["DESTDIR"] = destdir
|
||||
|
|
Загрузка…
Ссылка в новой задаче