diff --git a/README.md b/README.md index bb51d4cb..3456cd96 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ to a dialog popping up. Feel free to dupe [the radar][5]. 📡 XcodeInstall normally relies on the Spotlight index to locate installed versions of Xcode. If you use it while indexing is happening, it might show inaccurate results and it will not be able to see installed -versions on unindexed volumes. +versions on unindexed volumes. To workaround the Spotlight limitation, XcodeInstall searches `/Applications` folder to locate Xcodes when Spotlight is disabled on the machine, or when Spotlight query for Xcode does not return any results. But it still won't work if your Xcodes are not located under `/Applications` folder. diff --git a/lib/xcode/install.rb b/lib/xcode/install.rb index c8bf04bf..b7210d52 100644 --- a/lib/xcode/install.rb +++ b/lib/xcode/install.rb @@ -31,7 +31,6 @@ def fetch(url: nil, progress: nil, progress_block: nil) options = cookies.nil? ? [] : ['--cookie', cookies, '--cookie-jar', COOKIES_PATH] - uri = URI.parse(url) output ||= File.basename(uri.path) output = (Pathname.new(directory) + Pathname.new(output)) if directory @@ -329,7 +328,7 @@ def mount(dmg_path) node.text end - private + #private def spaceship @spaceship ||= begin @@ -379,7 +378,7 @@ def fetch_seedlist '/services-account/QH65B2/downloadws/listDownloads.action').body) names = @xcodes.map(&:name) - @xcodes += prereleases.reject { |pre| names.include?(pre.name) } + # @xcodes += prereleases.reject { |pre| names.include?(pre.name) } File.open(LIST_FILE, 'wb') do |f| f << Marshal.dump(xcodes) @@ -442,10 +441,14 @@ def prereleases return [] if scan.empty? - version = scan.first.gsub(/<.*?>/, '').gsub(/.*Xcode /, '') - link = body.scan(%r{