summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemant Kumar <gethemant@gmail.com>2013-09-03 11:00:15 +0530
committerHemant Kumar <gethemant@gmail.com>2013-09-03 11:00:22 +0530
commite1ac0f34939855cb37bf037d550602ff5890f4a5 (patch)
tree514151ba7f5cbcdd2b5e574b62d8457275540c7e
parent4a6c70dd58f49ef4064e3825b678982862f31df4 (diff)
downloadbundler-e1ac0f34939855cb37bf037d550602ff5890f4a5.tar.gz
Errno::EPIPE has to be handled so as Thor::Base.start doesn't issue exit(0)
If for some reason pipe to which message is being written is closed that causes a unhandled Errno::EPIPE exception which is handled by Thor itself and Thor calls exit(0) whenever that happens. This in turn prevents original exception to be printed because process exits before it can print the message.
-rw-r--r--lib/bundler/parallel_workers/unix_worker.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/parallel_workers/unix_worker.rb b/lib/bundler/parallel_workers/unix_worker.rb
index 71d130e0f9..ce7b7fe9ed 100644
--- a/lib/bundler/parallel_workers/unix_worker.rb
+++ b/lib/bundler/parallel_workers/unix_worker.rb
@@ -9,7 +9,7 @@ module Bundler
def work(obj)
Marshal.dump obj, io_w
Marshal.load io_r
- rescue IOError
+ rescue IOError, Errno::EPIPE
nil
end
end