ruby-changes:73043
From: Takuya <ko1@a...>
Date: Tue, 23 Aug 2022 14:29:03 +0900 (JST)
Subject: [ruby-changes:73043] 22a416a3bb (master): [rubygems/rubygems] Bundler: update the link suggested on error with the new one
https://git.ruby-lang.org/ruby.git/commit/?id=22a416a3bb From 22a416a3bbdcd868ad20f51ac690bef9f85303e7 Mon Sep 17 00:00:00 2001 From: Takuya Noguchi <takninnovationresearch@g...> Date: Tue, 23 Aug 2022 03:26:36 +0000 Subject: [rubygems/rubygems] Bundler: update the link suggested on error with the new one Also typo is fixed. Signed-off-by: Takuya Noguchi <takninnovationresearch@g...> https://github.com/rubygems/rubygems/commit/9c1ea52ddf --- lib/bundler.rb | 4 ++-- spec/bundler/bundler/bundler_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bundler.rb b/lib/bundler.rb index 79f65ccbe1..24785ef5eb 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -331,9 +331,9 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler.rb#L331 FileUtils.remove_entry_secure(path) if path && File.exist?(path) rescue ArgumentError 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. -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 File.world_writable?(path) ? Bundler.ui.warn(message) : raise raise PathError, "Please fix the world-writable issue with your #{path} directory" diff --git a/spec/bundler/bundler/bundler_spec.rb b/spec/bundler/bundler/bundler_spec.rb index aeadcf9720..9e79bc165f 100644 --- a/spec/bundler/bundler/bundler_spec.rb +++ b/spec/bundler/bundler/bundler_spec.rb @@ -167,9 +167,9 @@ RSpec.describe Bundler do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/bundler_spec.rb#L167 allow(::Bundler::FileUtils).to receive(:remove_entry_secure).and_raise(ArgumentError) allow(File).to receive(:world_writable?).and_return(true) 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. -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 expect(bundler_ui).to receive(:warn).with(message) expect { Bundler.send(:rm_rf, bundled_app) }.to raise_error(Bundler::PathError) -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/