Use Pathname.glob when we want pathname objects
This commit is contained in:
parent
bf365fc23b
commit
a023f10310
@ -359,8 +359,7 @@ class Pathname
|
|||||||
# Writes a wrapper env script and moves all files to the dst
|
# Writes a wrapper env script and moves all files to the dst
|
||||||
def env_script_all_files dst, env
|
def env_script_all_files dst, env
|
||||||
dst.mkpath
|
dst.mkpath
|
||||||
Dir["#{self}/*"].each do |file|
|
Pathname.glob("#{self}/*") do |file|
|
||||||
file = Pathname.new(file)
|
|
||||||
dst.install_p file
|
dst.install_p file
|
||||||
new_file = dst+file.basename
|
new_file = dst+file.basename
|
||||||
file.write_env_script(new_file, env)
|
file.write_env_script(new_file, env)
|
||||||
|
|||||||
@ -649,8 +649,7 @@ class FormulaInstaller
|
|||||||
downloader.stage
|
downloader.stage
|
||||||
end
|
end
|
||||||
|
|
||||||
Dir["#{f.bottle_prefix}/{etc,var}/**/*"].each do |file|
|
Pathname.glob("#{f.bottle_prefix}/{etc,var}/**/*") do |path|
|
||||||
path = Pathname.new(file)
|
|
||||||
path.extend(InstallRenamed)
|
path.extend(InstallRenamed)
|
||||||
path.cp_path_sub(f.bottle_prefix, HOMEBREW_PREFIX)
|
path.cp_path_sub(f.bottle_prefix, HOMEBREW_PREFIX)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user