lib/u3d/installer.rb in u3d-1.1.3 vs lib/u3d/installer.rb in u3d-1.1.4
- old
+ new
@@ -82,17 +82,11 @@
end
def installed_sorted_by_versions
list = installed
return [] if list.empty?
- # version -> installations
- arraym = list.map { |a| [a.version, a] }
- map = Hash[*arraym.flatten]
- # sorted versions
- vcomparators = map.keys.map { |k| UnityVersionComparator.new(k) }
- sorted_keys = vcomparators.sort.map { |v| v.version.to_s }
- sorted_keys.map { |k| map[k] }
+ list.sort { |a, b| UnityVersionComparator.new(a.version) <=> UnityVersionComparator.new(b.version) }
end
end
# deprecated
class CommonInstaller
@@ -283,10 +277,10 @@
raise 'Missing 7z' if `which 7z`.empty?
Dir.mktmpdir do |tmp_dir|
UI.verbose "Working in tmp dir #{tmp_dir}"
- command = "7z -aos -o#{tmp_dir.shellescape} e #{file.shellescape}"
+ command = "7z -aos -t* -o#{tmp_dir.shellescape} e #{file.shellescape}"
U3dCore::CommandExecutor.execute(command: command)
target_location = pkg_install_path(installation_path, "#{tmp_dir}/PackageInfo")
# raise "Path for #{target_location} already exists" if path File.exist? target_location