diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index 9f863d180f..538baed2c1 100644 --- a/Library/Homebrew/cmd/list.rb +++ b/Library/Homebrew/cmd/list.rb @@ -245,6 +245,7 @@ module Homebrew class PrettyListing sig { params(path: T.any(String, Pathname, Keg)).void } def initialize(path) + valid_lib_extensions = [".dylib", ".pc"] Pathname.new(path).children.sort_by { |p| p.to_s.downcase }.each do |pn| case pn.basename.to_s when "bin", "sbin" @@ -252,7 +253,7 @@ module Homebrew when "lib" print_dir pn do |pnn| # dylibs have multiple symlinks and we don't care about them - [".dylib", ".pc"].include?(pnn.extname) && !pnn.symlink? + valid_lib_extensions.include?(pnn.extname) && !pnn.symlink? end when ".brew" next # Ignore .brew diff --git a/Library/Homebrew/extend/os/linux/extend/ENV/super.rb b/Library/Homebrew/extend/os/linux/extend/ENV/super.rb index 0d2676055d..29ff410094 100644 --- a/Library/Homebrew/extend/os/linux/extend/ENV/super.rb +++ b/Library/Homebrew/extend/os/linux/extend/ENV/super.rb @@ -29,7 +29,8 @@ module Superenv self["HOMEBREW_OPTIMIZATION_LEVEL"] = "O2" self["HOMEBREW_DYNAMIC_LINKER"] = determine_dynamic_linker_path self["HOMEBREW_RPATH_PATHS"] = determine_rpath_paths(@formula) - self["M4"] = "#{HOMEBREW_PREFIX}/opt/m4/bin/m4" if deps.any? { |d| ["libtool", "bison"].include?(d.name) } + m4_path_deps = ["libtool", "bison"] + self["M4"] = "#{HOMEBREW_PREFIX}/opt/m4/bin/m4" if deps.any? { m4_path_deps.include?(_1.name) } end def homebrew_extra_paths