summaryrefslogtreecommitdiff
path: root/lib/bundler.rb
diff options
context:
space:
mode:
authorZehan Zhao <cnallenzhao@gmail.com>2016-07-25 17:02:39 +0800
committerZehan Zhao <cnallenzhao@gmail.com>2016-08-06 04:29:58 +0800
commit73f8e9a865d4cd2a0cf68b6effc5ff5bc0d027ad (patch)
tree6db1e26ce9e28927e539031880c3dbb43f38bcb9 /lib/bundler.rb
parente00179ea7211ac902e64ad1e08d5b0a26d14adb7 (diff)
downloadbundler-73f8e9a865d4cd2a0cf68b6effc5ff5bc0d027ad.tar.gz
Add spec test
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r--lib/bundler.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 15b38869f2..aa30663a46 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -202,8 +202,8 @@ It is a security vulnerability to allow your home directory to be world-writable
You should probably consider fixing this issue by running `chmod o-w ~` on *nix.
Please refer to http://ruby-doc.org/stdlib-2.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.
EOF
- Bundler.ui.warn(message) if File.expand_path(path).world_writable?
- raise
+ File.world_writable?(path) ? Bundler.ui.warn(message) : raise
+ raise PathError, "Please fix the world-writable issue with your #{path} directory"
end
def settings