Assume Cygwin has a TTY for input [GH-1430]

This commit is contained in:
Mitchell Hashimoto 2013-04-06 16:07:20 -07:00
parent 5ca89383f8
commit 0874d4a77a
2 changed files with 3 additions and 1 deletions

View File

@ -49,6 +49,7 @@ BUG FIXES:
that is also in use. that is also in use.
- Cygwin will always output color by default. Specify `--no-color` to - Cygwin will always output color by default. Specify `--no-color` to
override this. override this.
- Assume Cygwin has a TTY for asking for input. [GH-1430]
## 1.1.6 (April 3, 2013) ## 1.1.6 (April 3, 2013)

View File

@ -2,6 +2,7 @@ require "thread"
require "log4r" require "log4r"
require "vagrant/util/platform"
require "vagrant/util/safe_puts" require "vagrant/util/safe_puts"
module Vagrant module Vagrant
@ -77,7 +78,7 @@ module Vagrant
super(message) super(message)
# We can't ask questions when the output isn't a TTY. # We can't ask questions when the output isn't a TTY.
raise Errors::UIExpectsTTY if !$stdin.tty? raise Errors::UIExpectsTTY if !$stdin.tty? && !Vagrant::Util::Platform.cygwin?
# Setup the options so that the new line is suppressed # Setup the options so that the new line is suppressed
opts ||= {} opts ||= {}