mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
5c1ae5bbb7
repair broken patches closes #5679 closes #5863
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
|
|
index b186375..de168c4 100644
|
|
--- a/lib/rubygems/defaults.rb
|
|
+++ b/lib/rubygems/defaults.rb
|
|
@@ -111,18 +111,17 @@
|
|
# The path to standard location of the user's configuration directory.
|
|
|
|
def self.config_home
|
|
- @config_home ||= ENV["XDG_CONFIG_HOME"] || File.join(Gem.user_home, ".config")
|
|
+ @config_home ||= ENV["XDG_CONFIG_HOME"] || File.join(Gem.user_home, ".gem")
|
|
end
|
|
|
|
##
|
|
# Finds the user's config file
|
|
|
|
def self.find_config_file
|
|
- gemrc = File.join Gem.user_home, ".gemrc"
|
|
- if File.exist? gemrc
|
|
- gemrc
|
|
+ @gemrc = if ENV["XDG_CONFIG_HOME"]
|
|
+ File.join ENV["XDG_CONFIG_HOME"], "gemrc"
|
|
else
|
|
- File.join Gem.config_home, "gem", "gemrc"
|
|
+ File.join Gem.user_home, ".gemrc"
|
|
end
|
|
end
|
|
|
|
@@ -151,7 +143,11 @@ def self.cache_home
|
|
# The path to standard location of the user's data directory.
|
|
|
|
def self.data_home
|
|
- @data_home ||= ENV["XDG_DATA_HOME"] || File.join(Gem.user_home, ".local", "share")
|
|
+ @data_home ||= if ENV["XDG_DATA_HOME"]
|
|
+ File.join(ENV["XDG_DATA_HOME"], "gem")
|
|
+ else
|
|
+ File.join(Gem.user_home, ".gem")
|
|
+ end
|
|
end
|
|
|
|
##
|