diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 3930deb3bc..0582e55e86 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -432,6 +432,7 @@ class Pathname def install_metafiles(from = Pathname.pwd) Pathname(from).children.each do |p| next if p.directory? + next if File.zero?(p) next unless Metafiles.copy?(p.basename.to_s) # Some software symlinks these files (see help2man.rb) diff --git a/Library/Homebrew/test/formula_installer_spec.rb b/Library/Homebrew/test/formula_installer_spec.rb index b4233dfaff..742f6a2d81 100644 --- a/Library/Homebrew/test/formula_installer_spec.rb +++ b/Library/Homebrew/test/formula_installer_spec.rb @@ -51,7 +51,8 @@ describe FormulaInstaller do specify "basic installation" do temporary_install(Testball.new) do |f| # Test that things made it into the Keg - expect(f.prefix/"readme").to exist + # "readme" is empty, so it should not be installed + expect(f.prefix/"readme").not_to exist expect(f.bin).to be_a_directory expect(f.bin.children.count).to eq(3)