summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-05 23:52:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-05 23:52:49 +0000
commitfa20fd84695f40755b1ce2f41d2341920366cc2b (patch)
tree3f54532ba91526e842adf94552dfbc67fcb31ecc
parentb9eb70634e8dfbd57e4344f33989eef9c2069497 (diff)
rbinstall.rb: Gem::Installer lacks dir_mode option
* tool/rbinstall.rb (bundle-gems): Gem::Installer does not support directory permission option, set umask to owner writable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rwxr-xr-xtool/rbinstall.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 0b26ba3..9f42325 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -845,7 +845,14 @@ install?(:ext, :comm, :gem, :'bundle-gems') do
inst = Gem::Installer.new(gem, options)
inst.spec.extension_dir = with_destdir(inst.spec.extension_dir)
begin
- Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
+ Gem::DefaultUserInteraction.use_ui(silent) do
+ begin
+ File.umask(022)
+ inst.install
+ ensure
+ File.umask(0222)
+ end
+ end
rescue Gem::InstallError => e
next
end