vim, macvim: tweak language type reporting again.

This commit is contained in:
Mike McQuaid 2016-06-16 08:30:40 +01:00
parent 174a23a799
commit 6ff8dc859e
2 changed files with 4 additions and 4 deletions

View file

@ -27,7 +27,7 @@ class Macvim < Formula
def language_type language
type = if which(language).to_s == "/usr/bin/#{language}"
"system"
elsif which(language).to_s == "#{HOMEBREW_PREFIX}/bin/#{language}"
elsif which(language).to_s == "#{HOMEBREW_PREFIX}/opt/#{language}/bin/#{language}"
"homebrew"
else
"custom"
@ -36,7 +36,7 @@ class Macvim < Formula
end
def install
Utils::Analytics.report_event "macvim_language_type",
Utils::Analytics.report_event "macvim_language_type2",
"#{language_type("python")}, #{language_type("ruby")}, #{language_type("perl")}"
# MacVim doesn't have or require any Python package, so unset PYTHONPATH

View file

@ -41,7 +41,7 @@ class Vim < Formula
def language_type language
type = if which(language).to_s == "/usr/bin/#{language}"
"system"
elsif which(language).to_s == "#{HOMEBREW_PREFIX}/bin/#{language}"
elsif which(language).to_s == "#{HOMEBREW_PREFIX}/opt/#{language}/bin/#{language}"
"homebrew"
else
"custom"
@ -50,7 +50,7 @@ class Vim < Formula
end
def install
Utils::Analytics.report_event "vim_language_type",
Utils::Analytics.report_event "vim_language_type2",
"#{language_type("python")}, #{language_type("ruby")}, #{language_type("perl")}"
# https://github.com/Homebrew/homebrew-core/pull/1046