From 4671526d70d33de7e44d42a28ce2eee912783dc6 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sun, 23 Aug 2009 17:56:27 +0100 Subject: [PATCH] Raise a SystemExit exception to prevent backtrace --- Library/Homebrew/utils.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 06b9cab21d..2d5cb20f97 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -43,11 +43,9 @@ end def interactive_shell pid=fork - if pid.nil? - exec ENV['SHELL'] - else - Process.wait pid - end + exec ENV['SHELL'] if pid.nil? + Process.wait pid + raise SystemExit, "Aborting due to non-zero exit status" if $? != 0 end # Kernel.system but with exceptions