Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CLI installer
Browse files Browse the repository at this point in the history
marcomorain committed Sep 23, 2019
1 parent 7b64e49 commit 102bc31
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

3 changes: 1 addition & 2 deletions lib/xcode/install.rb
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion lib/xcode/install/command.rb
Original file line number Diff line number Diff line change
@@ -20,9 +20,10 @@ class Command < CLAide::Command
require 'xcode/install/list'
require 'xcode/install/select'
require 'xcode/install/selected'
require 'xcode/install/simulators'
require 'xcode/install/tools.rb'
require 'xcode/install/uninstall'
require 'xcode/install/update'
require 'xcode/install/simulators'

self.abstract_command = true
self.command = 'xcversion'
2 changes: 1 addition & 1 deletion xcode-install.gemspec
Original file line number Diff line number Diff line change
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
# contains spaceship, which is used for auth and dev portal interactions
spec.add_dependency 'fastlane', '>= 2.1.0', '< 3.0.0'

spec.add_development_dependency 'bundler', '~> 1.7'
spec.add_development_dependency 'bundler', '~> 2.0.2'
spec.add_development_dependency 'rake', '~> 10.0'
end

0 comments on commit 102bc31

Please sign in to comment.