From 3c2656c9339738e97480ea5854d0756f2449c929 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 29 Jul 2011 15:17:35 +0100 Subject: [PATCH] Better check for already installed --- install_homebrew.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_homebrew.rb b/install_homebrew.rb index 0db88e7541..adc7882b96 100644 --- a/install_homebrew.rb +++ b/install_homebrew.rb @@ -54,7 +54,7 @@ ensure end ####################################################################### script -abort "/usr/local/.git already exists!" if File.directory? "/usr/local/.git" +abort "/usr/local/.git already exists!" unless Dir["/usr/local/.git/*"].empty? abort "Don't run this as root!" if Process.uid == 0 abort <<-EOABORT unless `groups`.split.include? "staff" This script requires the user #{ENV['USER']} to be in the staff group. If this