From dfa75f9230f75060a693add842fcdc5648398c69 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 9 Mar 2012 11:59:40 +0000 Subject: [PATCH] Allow "Press Enter" to be a \r Some wrapper-tools push \r rather than \n and break the installer. --- install_homebrew.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install_homebrew.rb b/install_homebrew.rb index f17036a140..df3a017e4c 100644 --- a/install_homebrew.rb +++ b/install_homebrew.rb @@ -106,7 +106,9 @@ end if STDIN.tty? puts puts "Press enter to continue" - abort unless getc == 13 + c = getc + # we test for \r and \n because some stuff does \r instead + abort unless c == 13 or c == 10 end if File.directory? "/usr/local"