Skip to content

Commit

Permalink
[Repo] Update only git repositories.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed May 29, 2012
1 parent aa887ea commit 6d79bcd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/cocoapods/command/repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ def update
dirs = @name ? [dir] : config.repos_dir.children.select {|c| c.directory?}
dirs.each do |dir|
print_subtitle "Updating spec repo `#{dir.basename}'"
Dir.chdir(dir) { git("pull") }
Dir.chdir(dir) do
`git rev-parse >/dev/null 2>&1`
if $?.exitstatus.zero?
git("pull")
else
puts(" Not a git repository") if config.verbose?
end
end
check_versions(dir)
end
end
Expand Down

0 comments on commit 6d79bcd

Please sign in to comment.