Skip to content

Commit

Permalink
Also rescue Errno::EHOSTDOWN in send method
Browse files Browse the repository at this point in the history
Otherwise `pod setup` fails, just because the stats upload is blocked.
This happens when using a strict firewall or something like LittleSnitch on OS X.

Signed-off-by: Clemens Gruber <clemensgru@gmail.com>
  • Loading branch information
clemensg committed Jul 28, 2015
1 parent ff4a97c commit 0481c35
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,14 @@
#CocoaPods Stats CHANGELOG

## 0.5.4

##### Bug Fixes

* Also rescue Errno::EHOSTDOWN when sending stats (could be blocked by a
firewall and should not stop the user from installing pods)
[Clemens Gruber](https://github.com/clemensg)


## 0.5.3

##### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods_stats/sender.rb
Expand Up @@ -15,7 +15,7 @@ def send(targets, pod_try: false)
'Accept' => 'application/json',
'Content-Type' => 'application/json',
)
rescue REST::Error => e
rescue REST::Error, Errno::EHOSTDOWN => e
Pod::UI.message "Failed to send stats:\n\n#{e}"
end
end
Expand Down

0 comments on commit 0481c35

Please sign in to comment.