diff options
| author | Jack Nagel | 2014-03-26 13:45:46 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-26 13:45:46 -0500 |
| commit | b7063f5d52cff5f3d748f8255992cceb05330d0c (patch) | |
| tree | d37caf7d0a441b5bdffa059ed2e9ff3511137031 /Library/Homebrew/extend/pathname.rb | |
| parent | 5bd6f27a6ed4ffd8ede749780f2d5a4cf796d485 (diff) | |
| download | homebrew-b7063f5d52cff5f3d748f8255992cceb05330d0c.tar.bz2 | |
Fall back to Process.gid if we aren't a member of the file's group
Diffstat (limited to 'Library/Homebrew/extend/pathname.rb')
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index cb76c8910..c9c233144 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -110,8 +110,11 @@ class Pathname FileUtils.mv tf.path, self + uid = Process.uid + gid = Process.groups.delete(old_stat.gid) { Process.gid } + begin - chown(old_stat.uid, old_stat.gid) + chown(uid, gid) chmod(old_stat.mode) rescue Errno::EPERM end |
