Fix exiting the debugger menu with CTRL-D
This commit is contained in:
parent
79a6e59e6e
commit
c8bb68a795
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user