mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Add missing require 'fileutils'
in Gem::ConfigFile
https://github.com/rubygems/rubygems/commit/c4004fadd9
This commit is contained in:
parent
71d3c9bbfa
commit
650a65c6fc
1 changed files with 4 additions and 4 deletions
|
@ -320,7 +320,8 @@ if you believe they were disclosed to a third party.
|
|||
config = load_file(credentials_path).merge(host => api_key)
|
||||
|
||||
dirname = File.dirname credentials_path
|
||||
FileUtils.mkdir_p(dirname) unless File.exist? dirname
|
||||
require 'fileutils'
|
||||
FileUtils.mkdir_p(dirname)
|
||||
|
||||
Gem.load_yaml
|
||||
|
||||
|
@ -457,9 +458,8 @@ if you believe they were disclosed to a third party.
|
|||
|
||||
# Writes out this config file, replacing its source.
|
||||
def write
|
||||
unless File.exist?(File.dirname(config_file_name))
|
||||
FileUtils.mkdir_p File.dirname(config_file_name)
|
||||
end
|
||||
require 'fileutils'
|
||||
FileUtils.mkdir_p File.dirname(config_file_name)
|
||||
|
||||
File.open config_file_name, 'w' do |io|
|
||||
io.write to_yaml
|
||||
|
|
Loading…
Add table
Reference in a new issue