From 205ccc3c3a91b2af9c573c8f48e2d7d92a4d8959 Mon Sep 17 00:00:00 2001 From: Josh Hagins Date: Mon, 4 Jan 2016 18:08:06 -0500 Subject: [PATCH] Print error messages to stderr --- lib/hbc/cli.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hbc/cli.rb b/lib/hbc/cli.rb index e78dcfca41..51dae6506c 100644 --- a/lib/hbc/cli.rb +++ b/lib/hbc/cli.rb @@ -116,13 +116,13 @@ class Hbc::CLI run_command(command, *rest) rescue Hbc::CaskError, Hbc::CaskSha256MismatchError => e onoe e - puts Hbc::Utils.error_message_with_suggestions if e.is_a?(Hbc::CaskHeaderParseError) + $stderr.puts Hbc::Utils.error_message_with_suggestions if e.is_a?(Hbc::CaskHeaderParseError) $stderr.puts e.backtrace if Hbc.debug exit 1 rescue StandardError, ScriptError, NoMemoryError => e onoe e - puts Hbc::Utils.error_message_with_suggestions - puts e.backtrace + $stderr.puts Hbc::Utils.error_message_with_suggestions + $stderr.puts e.backtrace exit 1 end