aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler.rb
diff options
context:
space:
mode:
authorSmit Shah <who828@gmail.com>2014-03-01 14:18:22 +0530
committerSmit Shah <who828@gmail.com>2014-03-01 14:18:22 +0530
commitaad165a34a621edf17e937068f311bfef3663cd9 (patch)
tree9c3295f07c43290e26b43120eaea571b15291f6a /lib/bundler.rb
parentdf23755daf2c4c3e372b0bf897ffbb35c6589d2e (diff)
downloadbundler-aad165a34a621edf17e937068f311bfef3663cd9.tar.gz
If any file is not writable then we need sudo
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r--lib/bundler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index eef79b3c..68603948 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -279,7 +279,7 @@ module Bundler
# if any directory is not writable, we need sudo
dirs = [path, bin_dir] | Dir[path.join('*').to_s]
- sudo_needed = dirs.find{|d| !File.writable?(d) }
+ sudo_needed = dirs.any?{|d| !File.writable?(d) }
end
@requires_sudo_ran = true