diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2023-12-14 10:10:49 +0800 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-12-15 15:32:56 +0000 |
commit | 5a66ea23d2c244bac5d87a08939419cd300cf4cc (patch) | |
tree | 1c2069598a8733cce0b258c666de184b2511f3f7 /lib | |
parent | 474b4c42f4d1c36d94548548e03f6649f2119f67 (diff) |
[rubygems/rubygems] Use mkdir_p helper in bundler.rb
Small refactor, no functional change
https://github.com/rubygems/rubygems/commit/5edb7a1026
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index fc274ea263..7bb6690e52 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -100,9 +100,7 @@ module Bundler end def create_bundle_path - SharedHelpers.filesystem_access(bundle_path.to_s) do |p| - mkdir_p(p) - end unless bundle_path.exist? + mkdir_p(bundle_path) unless bundle_path.exist? @bundle_path = bundle_path.realpath rescue Errno::EEXIST @@ -119,7 +117,7 @@ module Bundler @bin_path ||= begin path = settings[:bin] || "bin" path = Pathname.new(path).expand_path(root).expand_path - SharedHelpers.filesystem_access(path) {|p| FileUtils.mkdir_p(p) } + mkdir_p(path) path end end @@ -483,7 +481,7 @@ module Bundler configured_bundle_path.use_system_gems? end - def mkdir_p(path, options = {}) + def mkdir_p(path) SharedHelpers.filesystem_access(path, :write) do |p| FileUtils.mkdir_p(p) end |