diff options
| author | Xu Cheng | 2016-02-15 22:31:47 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-02-16 14:23:39 +0800 |
| commit | 4e51c0b8ea371d15d2ae996700e1c988e79cab17 (patch) | |
| tree | ee0cf40d3a6b095ac33c126e0095b601fe678ba9 /Library/Homebrew/cmd/pull.rb | |
| parent | 578e68b2c1cda6af408ca04ed69877de15198b04 (diff) | |
| download | brew-4e51c0b8ea371d15d2ae996700e1c988e79cab17.tar.bz2 | |
add Tap#formula_file?
Return true if given path would present a Formula file in this Tap.
Accepts both absolute path and relative path (relative to this Tap's path)
It offer an abstraction such that caller would not need to worry about
low level file system in the tap.
It will be used in `brew pull` and `brew update`.
Closes Homebrew/homebrew#49191.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/cmd/pull.rb')
| -rw-r--r-- | Library/Homebrew/cmd/pull.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb index ad70f01f4..45c3bf76b 100644 --- a/Library/Homebrew/cmd/pull.rb +++ b/Library/Homebrew/cmd/pull.rb @@ -305,7 +305,7 @@ module Homebrew files << $1 if line =~ %r{^\+\+\+ b/(.*)} end files.each do |file| - if (tap.path/file).dirname == tap.formula_dir + if tap.formula_file?(file) formula_name = File.basename(file, ".rb") formulae << formula_name unless formulae.include?(formula_name) else |
