diff options
author | Nicholas La Roux <[email protected]> | 2025-06-06 20:41:41 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-06-23 11:07:03 +0900 |
commit | a1d62a3b1cdf5fca9f5976fa0d8b5ead82619ef6 () | |
tree | 9ee30d1f68aa073e23b66da6b88acb84f4b13b94 | |
parent | 8f009601f9a5440e656f02d0e5d6b2e88475f5b7 (diff) |
[rubygems/rubygems] Handle RubyGems installing to custom dir with non-existent parent dirs
https://.com/rubygems/rubygems/commit/4701123601
-rw-r--r-- | lib/rubygems/installer.rb | 6 | ||||
-rw-r--r-- | test/rubygems/installer_test_case.rb | 17 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_install_command.rb | 27 |
3 files changed, 45 insertions, 5 deletions
@@ -953,11 +953,7 @@ TEXT end def ensure_writable_dir(dir) # :nodoc: - begin - Dir.mkdir dir, *[options[:dir_mode] && 0o755].compact - rescue SystemCallError - raise unless File.directory? dir - end raise Gem::FilePermissionError.new(dir) unless File.writable? dir end @@ -221,6 +221,23 @@ class Gem::InstallerTestCase < Gem::TestCase force: force) end @@symlink_supported = nil # This is needed for Windows environment without symlink support enabled (the default @@ -1583,4 +1583,31 @@ ERROR: Possible alternatives: non_existent_with_hint assert_includes @ui.output, "A new release of RubyGems is available: 1.2.3 → 2.0.0!" end end end |