diff options
| -rw-r--r-- | lib/bundler.rb | 4 | ||||
| -rw-r--r-- | 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 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 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) |
