Browse files

On failing to retrieve branch information from gitcycle, gives a sugg…

…estion to try to do a git branch lighthouse_url
  • Loading branch information...
1 parent b3fb5f9 commit 2fc3222beeb5874ae376ffa8b8846f5815ee60c3 Alex Rockwell committed Mar 2, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/gitcycle.rb
@@ -752,6 +752,9 @@ def get(path, hash={})
json = open("#{API}/#{path}.json?#{params}").read
+ rescue OpenURI::HTTPError
+ puts "Did you mean to do: git branch #{hash['branch[lighthouse_url]']} ?".yellow
+ exit
rescue Exception
puts "\nCould not connect to Gitcycle.".red
puts "\nPlease verify your Internet connection and try again later.\n".yellow
@@ -857,4 +860,4 @@ def run(cmd)
def yes?(question)
q(question, " (#{"y".green}/#{"n".red})").downcase[0..0] == 'y'

0 comments on commit 2fc3222

Please sign in to comment.