Skip to content

Commit

Permalink
Update operating_system.rb to avoid early load of etc.so
Browse files Browse the repository at this point in the history
Fixes #388
Fixes ruby/etc#29
  • Loading branch information
larskanis authored Oct 17, 2024
1 parent 704d7a4 commit 1ad3d9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/files/operating_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def operating_system_defaults
end

begin
config_fname = Gem::ConfigFile::SYSTEM_WIDE_CONFIG_FILE
unless File.exist?(config_fname)
config_fname = ENV['ProgramData']
if config_fname && !File.exist?(config_fname)
File.open(config_fname, File::CREAT | File::EXCL | File::WRONLY) do |fd|
fd.write <<-EOT
# This is the system wide config file for Rubygems.
Expand Down

0 comments on commit 1ad3d9b

Please sign in to comment.