From 7a68b4a3f96c0cc76f94de2cd72b463b40be0343 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 5 Nov 2017 15:37:57 +0000 Subject: Refactor command handling code Don’t rely on having external commands always present in the PATH in order to find them. Instead, provide an accessory method to Tap so they can be added and used when needed. While we’re here, do some general refactoring and cleanup of the command code in these places. --- Library/Homebrew/tap.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library/Homebrew/tap.rb') diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 2d1c47e32..ed93e1266 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -503,6 +503,11 @@ class Tap map(&:name).sort end + # an array of all tap cmd directory {Pathname}s + def self.cmd_directories + Pathname.glob TAP_DIRECTORY/"*/*/cmd" + end + # @private def formula_file_to_name(file) "#{name}/#{file.basename(".rb")}" -- cgit v1.2.3