From 332c990377fa37b2aea13c646ed737f36a8b2b0b Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Tue, 5 Apr 2016 11:52:12 -0700 Subject: [PATCH] FileUtils::mktemp pass gid to Etc.getgrgid as int We need to move the Snow Leopard fix down since Etc.getgrgid can't handle a string. Closes #31. Signed-off-by: ilovezfs --- Library/Homebrew/extend/fileutils.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb index b3e1da87fc..74da1f6e68 100644 --- a/Library/Homebrew/extend/fileutils.rb +++ b/Library/Homebrew/extend/fileutils.rb @@ -22,10 +22,9 @@ module FileUtils else Process.gid end - # Make OS X 10.6.7 (ruby-1.8.7-p174) and earlier happy. - group_id = group_id.to_s begin - chown(nil, group_id, tmp) + # group_id.to_s makes OS X 10.6.7 (ruby-1.8.7-p174) and earlier happy. + chown(nil, group_id.to_s, tmp) rescue Errno::EPERM opoo "Failed setting group \"#{Etc.getgrgid(group_id).name}\" on #{tmp}" end