aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/debrew.rb
diff options
context:
space:
mode:
authorJack Nagel2014-09-18 14:16:07 -0500
committerJack Nagel2014-09-18 14:16:07 -0500
commitc8bb68a79550d22fb6e934dac242b10a2f43f3ae (patch)
tree010eddab3b3f32db24e94e17bfd3f9399d7a6f30 /Library/Homebrew/debrew.rb
parent79a6e59e6e7af943b98ecc58901d0a45592a139e (diff)
downloadbrew-c8bb68a79550d22fb6e934dac242b10a2f43f3ae.tar.bz2
Fix exiting the debugger menu with CTRL-D
Diffstat (limited to 'Library/Homebrew/debrew.rb')
-rw-r--r--Library/Homebrew/debrew.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/debrew.rb b/Library/Homebrew/debrew.rb
index f3d3dffa3..bc1495a99 100644
--- a/Library/Homebrew/debrew.rb
+++ b/Library/Homebrew/debrew.rb
@@ -62,7 +62,8 @@ module Debrew
menu.entries.each_with_index { |e, i| puts "#{i+1}. #{e.name}" }
print menu.prompt unless menu.prompt.nil?
- input = $stdin.gets.chomp
+ input = $stdin.gets or exit
+ input.chomp!
i = input.to_i
if i > 0
@@ -103,6 +104,8 @@ module Debrew
begin
yield
+ rescue SystemExit
+ original_raise
rescue Exception => e
debug(e)
ensure