From dec885bc16a2238e842c447dd10b9db00cd7554a Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 23 Jun 2010 16:25:53 +0100 Subject: Check for tty before trying to grab it --- install_homebrew.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install_homebrew.rb b/install_homebrew.rb index ee2042ab0..d8c28560c 100644 --- a/install_homebrew.rb +++ b/install_homebrew.rb @@ -102,9 +102,11 @@ unless chgrps.empty? puts *chgrps end -puts -puts "Press enter to continue" -abort unless getc == 13 +if STDIN.tty? + puts + puts "Press enter to continue" + abort unless getc == 13 +end if File.directory? "/usr/local" sudo "/bin/chmod", "g+w", *chmods unless chmods.empty? -- cgit v1.2.3