зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Only update env if var exists
Will save on an error if it would be nil from an exception happening during that line https://github.com/rubygems/rubygems/commit/d6797a04e9
This commit is contained in:
Родитель
616a7e1f6c
Коммит
0ca3a095be
|
@ -56,7 +56,7 @@ to the same gem path as user-installed gems.
|
|||
end
|
||||
|
||||
def execute
|
||||
gem_paths = { "GEM_HOME" => Gem.paths.home, "GEM_PATH" => Gem.paths.path.join(Gem.path_separator), "GEM_SPEC_CACHE" => Gem.paths.spec_cache_dir }
|
||||
gem_paths = { "GEM_HOME" => Gem.paths.home, "GEM_PATH" => Gem.paths.path.join(Gem.path_separator), "GEM_SPEC_CACHE" => Gem.paths.spec_cache_dir }.compact
|
||||
|
||||
check_executable
|
||||
|
||||
|
@ -74,7 +74,7 @@ to the same gem path as user-installed gems.
|
|||
|
||||
load!
|
||||
ensure
|
||||
ENV.update(gem_paths)
|
||||
ENV.update(gem_paths) if gem_paths
|
||||
Gem.clear_paths
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче