summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXabier de Zuazo <xabier@zuazo.org>2012-11-23 14:34:06 +0100
committerBryan McLellan <btm@opscode.com>2013-04-18 08:48:00 -0700
commit3cbb41c4f038e7ee93c2efd08544235ec5ae9ea1 (patch)
treec0f6530eb0e34257dbd32b0a5508eb4ba1465575
parent099ab645b93fd23e4aa1f27cbd7ef958fed39de8 (diff)
downloadchef-3cbb41c4f038e7ee93c2efd08544235ec5ae9ea1.tar.gz
[CHEF-3516] force knife to exit when an Errno::EPIPE exception is received
-rw-r--r--lib/chef/knife/core/ui.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/knife/core/ui.rb b/lib/chef/knife/core/ui.rb
index 6efa017e2d..6af5f17fcb 100644
--- a/lib/chef/knife/core/ui.rb
+++ b/lib/chef/knife/core/ui.rb
@@ -68,6 +68,7 @@ class Chef
stdout.puts message
rescue Errno::EPIPE => e
raise e if @config[:verbosity] >= 2
+ exit 0
end
end
@@ -79,6 +80,7 @@ class Chef
stderr.puts message
rescue Errno::EPIPE => e
raise e if @config[:verbosity] >= 2
+ exit 0
end
end
@@ -155,6 +157,7 @@ class Chef
stdout.puts data
rescue Errno::EPIPE => e
raise e if @config[:verbosity] >= 2
+ exit 0
end
end