Merge pull request #3334 from DomT4/ds_store_is_not_a_command
commands: filter out dotfiles from output
This commit is contained in:
commit
a2374cba6c
@ -51,8 +51,8 @@ module Homebrew
|
||||
end
|
||||
|
||||
def find_internal_commands(directory)
|
||||
directory.children.each_with_object([]) do |f, cmds|
|
||||
cmds << f.basename.to_s.sub(/\.(?:rb|sh)$/, "") if f.file?
|
||||
end
|
||||
Pathname.glob(directory/"*")
|
||||
.select(&:file?)
|
||||
.map { |f| f.basename.to_s.sub(/\.(?:rb|sh)$/, "") }
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user