summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-26 13:40:08 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-26 13:40:08 +0100
commit7f1ec3d02f62ddea6dac75513e320c607ac3ed93 (patch)
tree0ffc3cee3b0ace16ff940a6cfe8208a7b65d1b91 /lib
parent28eeef400af629c87804e96dd26e1c6a6b5a7a38 (diff)
downloadbundler-7f1ec3d02f62ddea6dac75513e320c607ac3ed93.tar.gz
Patch vendored fileutils to not activate `etc` gem
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/vendor/fileutils/lib/fileutils.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/bundler/vendor/fileutils/lib/fileutils.rb b/lib/bundler/vendor/fileutils/lib/fileutils.rb
index 77b3bade52..3a48e80293 100644
--- a/lib/bundler/vendor/fileutils/lib/fileutils.rb
+++ b/lib/bundler/vendor/fileutils/lib/fileutils.rb
@@ -1082,11 +1082,6 @@ module Bundler::FileUtils
end
module_function :chown_R
- begin
- require 'etc'
- rescue LoadError # rescue LoadError for miniruby
- end
-
def fu_get_uid(user) #:nodoc:
return nil unless user
case user
@@ -1095,6 +1090,7 @@ module Bundler::FileUtils
when /\A\d+\z/
user.to_i
else
+ require 'etc'
Etc.getpwnam(user) ? Etc.getpwnam(user).uid : nil
end
end
@@ -1108,6 +1104,7 @@ module Bundler::FileUtils
when /\A\d+\z/
group.to_i
else
+ require 'etc'
Etc.getgrnam(group) ? Etc.getgrnam(group).gid : nil
end
end