From 3086d63d8df79284159beb3587f0d74504ee240e Mon Sep 17 00:00:00 2001 From: Jerry Date: Thu, 16 Apr 2020 12:26:00 -0700 Subject: [PATCH] Normalize Cached Xcode to lowercase string Currently, Apple yields a file of the name Xcode_VERSION.xip. When loading this file from a cache, xcversion should be able to pick that up. It simply picks up the cached file by using a lowercase version of the string. --- lib/xcode/install.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xcode/install.rb b/lib/xcode/install.rb index 5b142577..49a064b9 100644 --- a/lib/xcode/install.rb +++ b/lib/xcode/install.rb @@ -373,7 +373,7 @@ def get_dmg(version, progress = true, url = nil, progress_block = nil) end if ENV.key?('XCODE_INSTALL_CACHE_DIR') Pathname.glob(ENV['XCODE_INSTALL_CACHE_DIR'] + '/*').each do |fpath| - return fpath if /^xcode_#{version}\.dmg|xip$/ =~ fpath.basename.to_s + return fpath if /^xcode_#{version}\.dmg|xip$/ =~ fpath.basename.to_s.downcase end end