commands: filter out dotfiles from output
This commit is contained in:
parent
270b752f5d
commit
2063e0fc52
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user