Skip to content

Commit

Permalink
rbinstall.rb: Gem::Installer lacks dir_mode option
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Feb 5, 2017
1 parent b9eb706 commit fa20fd8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tool/rbinstall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,14 @@ def install_default_gem(dir, srcdir)
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
Expand Down

0 comments on commit fa20fd8

Please sign in to comment.