Skip to content

Commit 3afe8ed

Browse files
hsbtmatzbot
authored andcommitted
[ruby/rubygems] Introduce default_spec_dir when it's not provided
ruby/rubygems@e9bd59699c
1 parent 7bd7bcb commit 3afe8ed

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/rubygems/installer.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,18 @@ def spec_file
398398
File.join gem_home, "specifications", "#{spec.full_name}.gemspec"
399399
end
400400

401+
def default_spec_dir
402+
dir = File.join(gem_home, "specifications", "default")
403+
FileUtils.mkdir_p dir
404+
dir
405+
end
406+
401407
##
402408
# The location of the default spec file for default gems.
403409
#
404410

405411
def default_spec_file
406-
File.join gem_home, "specifications", "default", "#{spec.full_name}.gemspec"
412+
File.join default_spec_dir, "#{spec.full_name}.gemspec"
407413
end
408414

409415
##

0 commit comments

Comments
 (0)