From 778b3fbcc97f0ba91748f0641ad9a9c6b797aed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohnic=CC=81?= Date: Thu, 27 Oct 2011 16:43:29 +0200 Subject: [PATCH] stderr where warnings are due --- lib/hub/commands.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/hub/commands.rb b/lib/hub/commands.rb index 6d4da83e..44060da0 100644 --- a/lib/hub/commands.rb +++ b/lib/hub/commands.rb @@ -342,7 +342,7 @@ module Hub # can't do anything without token and original owner name if github_user && github_token && repo_owner if repo_exists?(github_user) - puts "#{github_user}/#{repo_name} already exists on GitHub" + warn "#{github_user}/#{repo_name} already exists on GitHub" else fork_repo end @@ -391,7 +391,7 @@ module Hub repo_with_owner = "#{owner}/#{new_repo_name}" if repo_exists?(owner, new_repo_name) - puts "#{repo_with_owner} already exists on GitHub" + warn "#{repo_with_owner} already exists on GitHub" action = "set remote origin" else action = "created repository" @@ -516,7 +516,7 @@ module Hub def hub(args) return help(args) unless args[1] == 'standalone' require 'hub/standalone' - puts Hub::Standalone.build + $stdout.puts Hub::Standalone.build exit rescue LoadError abort "hub is running in standalone mode." @@ -699,7 +699,7 @@ help # Returns the terminal-formatted manpage, ready to be printed to # the screen. def hub_manpage - return "** Can't find groff(1)" unless command?('groff') + abort "** Can't find groff(1)" unless command?('groff') require 'open3' out = nil -- GitLab