diff options
| author | Jack Nagel | 2014-05-31 23:53:46 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-31 23:53:51 -0500 |
| commit | 6017507faf566fedc41d8c8f3ae3071df8f74ab0 (patch) | |
| tree | 5a81303f461e21e003b9868b6f50f1839004d473 /Library | |
| parent | 12442da0dbc5f49a0d39badf257b98c4b0f05a1e (diff) | |
| download | homebrew-6017507faf566fedc41d8c8f3ae3071df8f74ab0.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 |
