1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems/config_file.rb: Ignore permissions check on windows.

Windows writes 0600 file as 0644 permissions making the check
	  useless.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2013-02-05 07:37:16 +00:00
parent a106b310e5
commit 627a08251c
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Tue Feb 5 16:37:00 2013 Eric Hodel <drbrain@segment7.net>
* lib/rubygems/config_file.rb: Ignore permissions check on windows.
Windows writes 0600 file as 0644 permissions making the check
useless.
Tue Feb 5 16:25:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> Tue Feb 5 16:25:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_method.c (rb_obj_respond_to): drop optional include_all flag if * vm_method.c (rb_obj_respond_to): drop optional include_all flag if

View file

@ -230,6 +230,7 @@ class Gem::ConfigFile
# error message is displayed and RubyGems aborts. # error message is displayed and RubyGems aborts.
def check_credentials_permissions def check_credentials_permissions
return if Gem.win_platform? # windows doesn't write 0600 as 0600
return unless File.exist? credentials_path return unless File.exist? credentials_path
existing_permissions = File.stat(credentials_path).mode & 0777 existing_permissions = File.stat(credentials_path).mode & 0777