diff options
author | Smit Shah <who828@gmail.com> | 2014-03-02 10:45:57 +0530 |
---|---|---|
committer | Smit Shah <who828@gmail.com> | 2014-03-02 10:45:57 +0530 |
commit | c3dc13e9b616b1d892c278a375b41f1cbb6090a5 (patch) | |
tree | 5781d4d3b8ee9dac2160d6cabbefbd6fc9719d4e /lib/bundler.rb | |
parent | d4a6ad5f9b4e60dfd9736c8a74931ab45bf06436 (diff) | |
download | bundler-c3dc13e9b616b1d892c278a375b41f1cbb6090a5.tar.gz |
Check if all the files in build_info are writable or not
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r-- | lib/bundler.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index eef79b3c..d499c0b4 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -278,8 +278,8 @@ module Bundler bin_dir = bin_dir.parent until bin_dir.exist? # 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) } + dirs = [path, bin_dir] | Dir[path.join('build_info/*').to_s] | Dir[path.join('*').to_s] + sudo_needed = dirs.any?{|d| !File.writable?(d) } end @requires_sudo_ran = true |