cask/audit: use select instead of reject.
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
This commit is contained in:
parent
475fc1d281
commit
a7b2da0fc4
@ -580,8 +580,8 @@ module Cask
|
||||
|
||||
result = case artifact
|
||||
when Artifact::App
|
||||
files = Dir[path/"Contents/MacOS/*"].reject do |f|
|
||||
!File.executable?(f) || File.directory?(f) || f.end_with?(".dylib")
|
||||
files = Dir[path/"Contents/MacOS/*"].select do |f|
|
||||
File.executable?(f) && !File.directory?(f) && !f.end_with?(".dylib")
|
||||
end
|
||||
add_error "No binaries in App: #{artifact.source}", location: cask.url.location if files.empty?
|
||||
system_command("lipo", args: ["-archs", files.first], print_stderr: false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user