aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2010-06-23 16:25:53 +0100
committerMax Howell2012-03-09 12:09:37 +0000
commitdec885bc16a2238e842c447dd10b9db00cd7554a (patch)
tree5c30a1f3853aaf9565b6f5d56441d8b63bca481e
parentd9f1be7ef270458b38d9b41d64d0d807dbabd405 (diff)
downloadbrew-dec885bc16a2238e842c447dd10b9db00cd7554a.tar.bz2
Check for tty before trying to grab it
-rw-r--r--install_homebrew.rb8
1 files 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?