Formula#file_modified?: use Utils.git_available?
This commit is contained in:
parent
8d5c445daa
commit
faa6334774
@ -918,13 +918,7 @@ class Formula
|
||||
|
||||
# @private
|
||||
def file_modified?
|
||||
git = which("git")
|
||||
|
||||
# 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?
|
||||
return false unless Utils.git_available?
|
||||
|
||||
path.parent.cd do
|
||||
diff = Utils.popen_read("git", "diff", "origin/master", "--", "#{path}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user