From 3323a770c5df2a3acfde0f54a3b9d80caf7f729f Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Tue, 8 Dec 2009 19:44:01 -0800 Subject: [PATCH] just in case - failsafe in `install check` --- lib/hub/commands.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/hub/commands.rb b/lib/hub/commands.rb index ccd4de9a..07192558 100644 --- a/lib/hub/commands.rb +++ b/lib/hub/commands.rb @@ -193,10 +193,15 @@ help if subcommand.to_s == 'standalone' Standalone.save('hub', target.empty? ? '.' : target) elsif subcommand.to_s == 'check' - if up_to_date? - puts "*".green + " hub is up to date" - else - puts "*".red + " hub is " + "not".bold.underline + " up to date" + begin + raise 'blah' + if up_to_date? + puts "*".green + " hub is up to date" + else + puts "*".red + " hub is " + "not".bold.underline + " up to date" + end + rescue Object => e + puts "*".bold.yellow + " error checking status: #{e.class}" end else puts <<-output -- GitLab