aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Alpert2009-08-31 18:04:09 -0600
committerMax Howell2009-09-01 10:35:07 +0100
commitcba07d66677dc1564c8ffdb0f27fd3c212df4a74 (patch)
treef713c0f89f7e0fc9bfa38b8cb27ee013acab12af
parent70518ce8ec667bf068fd3762219f2d07d6735a1f (diff)
downloadhomebrew-cba07d66677dc1564c8ffdb0f27fd3c212df4a74.tar.bz2
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.
-rwxr-xr-xbin/brew3
1 files changed, 0 insertions, 3 deletions
diff --git a/bin/brew b/bin/brew
index 79545b4ac..8f38975ae 100755
--- a/bin/brew
+++ b/bin/brew
@@ -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