Formula#file_modified?: use Utils.git_available?
This commit is contained in:
parent
8d5c445daa
commit
faa6334774
@ -918,13 +918,7 @@ class Formula
|
|||||||
|
|
||||||
# @private
|
# @private
|
||||||
def file_modified?
|
def file_modified?
|
||||||
git = which("git")
|
return false unless Utils.git_available?
|
||||||
|
|
||||||
# git isn't installed by older Xcodes
|
|
||||||
return false if git.nil?
|
|
||||||
|
|
||||||
# /usr/bin/git is a popup stub when Xcode/CLT aren't installed, so bail out
|
|
||||||
return false if git == "/usr/bin/git" && !MacOS.has_apple_developer_tools?
|
|
||||||
|
|
||||||
path.parent.cd do
|
path.parent.cd do
|
||||||
diff = Utils.popen_read("git", "diff", "origin/master", "--", "#{path}")
|
diff = Utils.popen_read("git", "diff", "origin/master", "--", "#{path}")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user