Commit ce53feaf authored by Martin Kavalar's avatar Martin Kavalar

Running `pod repo update` in `pod install` command. Closes #48.

parent 36361198
......@@ -19,11 +19,13 @@ module Pod
def self.options
" --no-clean Leave SCM dirs like `.git' and `.svn' in tact after downloading\n" +
" --no-update Skip running `pod repo update` before install\n" +
super
end
def initialize(argv)
config.clean = !argv.option('--no-clean')
@update_repo = !argv.option('--no-update')
@projpath = argv.shift_argument
super unless argv.empty?
end
......@@ -35,6 +37,9 @@ module Pod
if @projpath && !File.exist?(@projpath)
raise Informative, "The specified project `#{@projpath}' does not exist."
end
if @update_repo
Repo.new(ARGV.new(["update"])).run
end
installer = Installer.new(podfile)
installer.install!
installer.configure_project(@projpath) if @projpath
......
......@@ -13,8 +13,7 @@ module Pod
def self.search(dependency)
all.map { |s| s.search(dependency) }.compact.first ||
raise(Informative, "Unable to find a pod named `#{dependency.name}'.\n" \
"You might want to run `pod repo update` and try again.")
raise(Informative, "Unable to find a pod named `#{dependency.name}'")
end
def self.search_by_name(query, full_text_search)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment