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
|
end
|
||||||
|
|
||||||
def find_internal_commands(directory)
|
def find_internal_commands(directory)
|
||||||
directory.children.each_with_object([]) do |f, cmds|
|
Pathname.glob(directory/"*")
|
||||||
cmds << f.basename.to_s.sub(/\.(?:rb|sh)$/, "") if f.file?
|
.select(&:file?)
|
||||||
end
|
.map { |f| f.basename.to_s.sub(/\.(?:rb|sh)$/, "") }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user