mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[rubygems/rubygems] Use mkdir_p helper in bundler.rb
Small refactor, no functional change
5edb7a1026
This commit is contained in:
parent
474b4c42f4
commit
5a66ea23d2
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue