Check for tty before trying to grab it

This commit is contained in:
Max Howell 2010-06-23 16:25:53 +01:00
parent d9f1be7ef2
commit dec885bc16

View File

@ -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?