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

Properly detect mode for binaries.

.gemspec files specifies not just `bin`, but also other directories.
This commit is contained in:
Vít Ondruch 2019-10-14 18:28:37 +02:00 committed by Nobuyoshi Nakada
parent e087b029e5
commit b8a8fdba63
Notes: git 2020-02-26 11:05:19 +09:00

View file

@ -721,7 +721,7 @@ module RbInstall
def extract_files(destination_dir, pattern = "*")
return if @src_dir == destination_dir
File.chmod(0700, destination_dir)
mode = pattern == "bin/*" ? prog_mode : data_mode
mode = pattern == File.join(spec.bindir, '*') ? prog_mode : data_mode
spec.files.each do |f|
src = File.join(@src_dir, f)
dest = File.join(without_destdir(destination_dir), f)