lib/u3d/commands.rb in u3d-1.1.1 vs lib/u3d/commands.rb in u3d-1.1.2

- old
+ new

@@ -105,12 +105,13 @@ def list_available(options: {}) ver = options[:unity_version] os = valid_os_or_current(options[:operating_system]) rl = options[:release_level] + central = options.fetch(:central, true) - cache_versions = cache_versions(os, force_refresh: options[:force]) + cache_versions = cache_versions(os, force_refresh: options[:force], central_cache: central) if ver cache_versions = cache_versions.extract(*cache_versions.keys.select { |k| Regexp.new(ver).match(k) }) return UI.error "Version #{ver} doesn't match any in cache" if cache_versions.empty? end @@ -263,11 +264,11 @@ } end private - def cache_versions(os, offline: false, force_refresh: false) - cache = Cache.new(force_os: os, offline: offline, force_refresh: force_refresh, central_cache: true) + def cache_versions(os, offline: false, force_refresh: false, central_cache: true) + cache = Cache.new(force_os: os, offline: offline, force_refresh: force_refresh, central_cache: central_cache) cache_os = cache[os.id2name] || {} cache_versions = cache_os['versions'] || {} cache_versions end