Skip to content
Snippets Groups Projects
Commit a2374cba authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #3334 from DomT4/ds_store_is_not_a_command

commands: filter out dotfiles from output
parents 460048bc 59238cd3
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment