Skip to content
Snippets Groups Projects
Commit c8bb68a7 authored by Jack Nagel's avatar Jack Nagel
Browse files

Fix exiting the debugger menu with CTRL-D

parent 79a6e59e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment