diff options
| author | Jack Nagel | 2014-05-31 23:53:46 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-31 23:53:51 -0500 |
| commit | a023f10310bfd11379202de87c28a7594fdfd363 (patch) | |
| tree | fd917bb216f0d92ab51e21433f9453b5e8bdd136 /Library | |
| parent | bf365fc23b89e924e1bfbbb65befdf2a72774819 (diff) | |
| download | brew-a023f10310bfd11379202de87c28a7594fdfd363.tar.bz2 | |
Use Pathname.glob when we want pathname objects
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 59061af88..b9730a89f 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -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) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 28061442e..7321f9c4d 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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 |
