commands: filter out dotfiles from output

This commit is contained in:
Dominyk Tiller 2017-10-18 11:34:33 +01:00
parent 270b752f5d
commit 2063e0fc52
No known key found for this signature in database
GPG Key ID: FE19AEFCF658C6F6

View File

@ -52,7 +52,10 @@ module Homebrew
def find_internal_commands(directory)
directory.children.each_with_object([]) do |f, cmds|
cmds << f.basename.to_s.sub(/\.(?:rb|sh)$/, "") if f.file?
if f.file?
next if f.basename.to_s =~ /^\./
cmds << f.basename.to_s.sub(/\.(?:rb|sh)$/, "")
end
end
end
end