mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
13 lines
293 B
Ruby
13 lines
293 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Commands
|
|
def self.path(cmd)
|
|
[
|
|
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh",
|
|
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh",
|
|
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb",
|
|
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb",
|
|
].find(&:exist?)
|
|
end
|
|
end
|