ruby/io-console

Please support Cygwin & gitbash

josenk opened this issue · 1 comments

Please support Cygwin & gitbash.

This code crashes when run on Cygwin terminals or gitbash.

require 'io/console'

puts "enter a string:"
data = STDIN.noecho(&:gets).chomp

#This also fails
#data = STDIN.raw().chomp

#This works
#data = $stdin.readline().chomp

puts "data received: |#{data}|"

Here is examples of use cases.
hashicorp/vagrant#5624
https://github.com/josenk/vagrant-vmware-esxi/blob/v2.0.6/lib/vagrant-vmware-esxi/action/esxi_password.rb (Line 40: Need rescue to workaround bug.)

nobu commented

I cannot reproduce it.
Could you try with recent versions?