From 7aef5695b8d225a89f41320869b5065fa8f1b158 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Wed, 14 Nov 2018 20:47:40 -0500 Subject: Permit redirecting stderr to /dev/null to shush deprecation warnings --- lib/tasks/ingress.rake | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/tasks/ingress.rake b/lib/tasks/ingress.rake index 96bd9b184a..6620e1fe43 100644 --- a/lib/tasks/ingress.rake +++ b/lib/tasks/ingress.rake @@ -11,7 +11,8 @@ namespace :action_mailbox do url, password = ENV.values_at("URL", "INGRESS_PASSWORD") if url.blank? || password.blank? - abort "4.3.5 URL and INGRESS_PASSWORD are required" + puts "4.3.5 URL and INGRESS_PASSWORD are required" + exit 1 end begin @@ -24,16 +25,21 @@ namespace :action_mailbox do when response.status.success? puts "2.0.0 HTTP #{response.status}" when response.status.unauthorized? - abort "4.7.0 HTTP #{response.status}" + puts "4.7.0 HTTP #{response.status}" + exit 1 when response.status.unsupported_media_type? - abort "5.6.1 HTTP #{response.status}" + puts "5.6.1 HTTP #{response.status}" + exit 1 else - abort "4.0.0 HTTP #{response.status}" + puts "4.0.0 HTTP #{response.status}" + exit 1 end rescue HTTP::ConnectionError => error - abort "4.4.2 Error connecting to the Postfix ingress: #{error.message}" + puts "4.4.2 Error connecting to the Postfix ingress: #{error.message}" + exit 1 rescue HTTP::TimeoutError - abort "4.4.7 Timed out piping to the Postfix ingress" + puts "4.4.7 Timed out piping to the Postfix ingress" + exit 1 end end end -- cgit v1.2.3