[rubygems/rubygems] Bundler: update the link suggested on error with the new one

Also typo is fixed.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/9c1ea52ddf
This commit is contained in:
Takuya Noguchi 2022-08-23 03:26:36 +00:00 committed by git
parent 9f6fcfcd7f
commit 22a416a3bb
2 changed files with 4 additions and 4 deletions

View File

@ -331,9 +331,9 @@ module Bundler
FileUtils.remove_entry_secure(path) if path && File.exist?(path) FileUtils.remove_entry_secure(path) if path && File.exist?(path)
rescue ArgumentError rescue ArgumentError
message = <<EOF message = <<EOF
It is a security vulnerability to allow your home directory to be world-writable, and bundler can not continue. It is a security vulnerability to allow your home directory to be world-writable, and bundler cannot continue.
You should probably consider fixing this issue by running `chmod o-w ~` on *nix. You should probably consider fixing this issue by running `chmod o-w ~` on *nix.
Please refer to https://ruby-doc.org/stdlib-2.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details. Please refer to https://ruby-doc.org/stdlib-3.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.
EOF EOF
File.world_writable?(path) ? Bundler.ui.warn(message) : raise File.world_writable?(path) ? Bundler.ui.warn(message) : raise
raise PathError, "Please fix the world-writable issue with your #{path} directory" raise PathError, "Please fix the world-writable issue with your #{path} directory"

View File

@ -167,9 +167,9 @@ RSpec.describe Bundler do
allow(::Bundler::FileUtils).to receive(:remove_entry_secure).and_raise(ArgumentError) allow(::Bundler::FileUtils).to receive(:remove_entry_secure).and_raise(ArgumentError)
allow(File).to receive(:world_writable?).and_return(true) allow(File).to receive(:world_writable?).and_return(true)
message = <<EOF message = <<EOF
It is a security vulnerability to allow your home directory to be world-writable, and bundler can not continue. It is a security vulnerability to allow your home directory to be world-writable, and bundler cannot continue.
You should probably consider fixing this issue by running `chmod o-w ~` on *nix. You should probably consider fixing this issue by running `chmod o-w ~` on *nix.
Please refer to https://ruby-doc.org/stdlib-2.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details. Please refer to https://ruby-doc.org/stdlib-3.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.
EOF EOF
expect(bundler_ui).to receive(:warn).with(message) expect(bundler_ui).to receive(:warn).with(message)
expect { Bundler.send(:rm_rf, bundled_app) }.to raise_error(Bundler::PathError) expect { Bundler.send(:rm_rf, bundled_app) }.to raise_error(Bundler::PathError)