formula_installer: improve support for local bottle installs

This commit is contained in:
Nanda H Krishna 2021-05-31 16:48:20 +05:30
parent e0a66bb93c
commit 0735eba995
No known key found for this signature in database
GPG Key ID: 067E5FCD58ADF3AA
2 changed files with 12 additions and 12 deletions

View File

@ -404,7 +404,7 @@ class FormulaInstaller
options = display_options(formula).join(" ") options = display_options(formula).join(" ")
oh1 "Installing #{Formatter.identifier(formula.full_name)} #{options}".strip if show_header? oh1 "Installing #{Formatter.identifier(formula.full_name)} #{options}".strip if show_header?
unless formula.tap&.private? if formula.tap&.installed? && !formula.tap&.private?
action = "#{formula.full_name} #{options}".strip action = "#{formula.full_name} #{options}".strip
Utils::Analytics.report_event("install", action) Utils::Analytics.report_event("install", action)
@ -1163,7 +1163,7 @@ class FormulaInstaller
tab.source["versions"]["stable"] = formula.stable.version.to_s tab.source["versions"]["stable"] = formula.stable.version.to_s
tab.source["versions"]["version_scheme"] = formula.version_scheme tab.source["versions"]["version_scheme"] = formula.version_scheme
tab.source["path"] = formula.specified_path.to_s tab.source["path"] = formula.specified_path.to_s
tab.source["tap_git_head"] = formula.tap&.git_head tab.source["tap_git_revision"] = formula.tap&.installed? ? formula.tap&.git_head : nil
tab.tap = formula.tap tab.tap = formula.tap
tab.write tab.write

View File

@ -41,7 +41,7 @@ class Tab < OpenStruct
"source" => { "source" => {
"path" => formula.specified_path.to_s, "path" => formula.specified_path.to_s,
"tap" => formula.tap&.name, "tap" => formula.tap&.name,
"tap_git_head" => formula.tap&.git_head, "tap_git_revision" => formula.tap&.git_head,
"spec" => formula.active_spec_sym.to_s, "spec" => formula.active_spec_sym.to_s,
"versions" => { "versions" => {
"stable" => formula.stable&.version.to_s, "stable" => formula.stable&.version.to_s,
@ -196,7 +196,7 @@ class Tab < OpenStruct
"source" => { "source" => {
"path" => nil, "path" => nil,
"tap" => nil, "tap" => nil,
"tap_git_head" => nil, "tap_git_revision" => nil,
"spec" => "stable", "spec" => "stable",
"versions" => { "versions" => {
"stable" => nil, "stable" => nil,