Fix brew when using sudo

The PWD environment variable is apparently not set for root.

Signed Off By: Max Howell <max@methylblue.com>

I removed the Dir.chdir line altogether as it was a hacky solution to an issue
in Ruby that I encountered a lot during early development, ie. I'd brew rm
while working directory was set to that keg.
This commit is contained in:
Ben Alpert authored and Max Howell committed 2009-09-01 10:35:07 +01:00
1 parent 70518ce8ec
commit cba07d6667
1 file changed
-3
-3
View File
@@ -32,9 +32,6 @@ if `sw_vers -productVersion` =~ /10\.(\d)\.(\d+)/ and $1.to_i < 5
abort "But thanks for your interest anyway!"
end
# Pathname often throws if CWD doesn't exist
Dir.chdir '/' unless File.directory? ENV['PWD']
begin
case ARGV.shift