lib/vimgolf/ui.rb in vimgolf-0.4.1 vs lib/vimgolf/ui.rb in vimgolf-0.4.2

- old
+ new

@@ -1,7 +1,9 @@ require 'highline' +HighLine.track_eof = false + module VimGolf class CLI class UI < Thor::Base.shell def initialize @@ -56,10 +58,12 @@ details = Proc.new do |q| q.readline = !$stdin.tty? end @hl.ask(message, options[:choices] || [], &details) rescue EOFError - return '' + # be sure to exit, don't loop + error "Argh! Forced quit due to EOF error. Please report this problem so we can fix it!" + return :quit end end def color_string(str, type) @hl.color(