Use Pathname.glob when we want pathname objects

This commit is contained in:
Jack Nagel 2014-05-31 23:53:46 -05:00
parent bf365fc23b
commit a023f10310
2 changed files with 2 additions and 4 deletions

View File

@ -359,8 +359,7 @@ class Pathname
# Writes a wrapper env script and moves all files to the dst
def env_script_all_files dst, env
dst.mkpath
Dir["#{self}/*"].each do |file|
file = Pathname.new(file)
Pathname.glob("#{self}/*") do |file|
dst.install_p file
new_file = dst+file.basename
file.write_env_script(new_file, env)

View File

@ -649,8 +649,7 @@ class FormulaInstaller
downloader.stage
end
Dir["#{f.bottle_prefix}/{etc,var}/**/*"].each do |file|
path = Pathname.new(file)
Pathname.glob("#{f.bottle_prefix}/{etc,var}/**/*") do |path|
path.extend(InstallRenamed)
path.cp_path_sub(f.bottle_prefix, HOMEBREW_PREFIX)
end