Skip to content
Snippets Groups Projects
Commit faa63347 authored by Xu Cheng's avatar Xu Cheng
Browse files

Formula#file_modified?: use Utils.git_available?

parent 8d5c445d
No related branches found
No related tags found
No related merge requests found
......@@ -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}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment