Class: Homebrew::Cmd::UpdateReport Private

Inherits:
AbstractCommand show all
Defined in:
cmd/update-report.rb,
sorbet/rbi/dsl/homebrew/cmd/update_report.rbi

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser, ruby_cmd?

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::Cmd::UpdateReport::Args

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



10
# File 'sorbet/rbi/dsl/homebrew/cmd/update_report.rbi', line 10

def args; end

#donation_messagevoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.



54
55
56
57
58
59
60
61
62
# File 'cmd/update-report.rb', line 54

def donation_message
  return if Settings.read("donationmessage") == "true"

  ohai "Homebrew is run entirely by unpaid volunteers. Please consider donating:"
  puts "  #{Formatter.url("https://github.com/Homebrew/brew#-donations")}\n\n"

  # Consider the message possibly missed if not a TTY.
  Settings.write "donationmessage", true if $stdout.tty?
end

#migrate_caskroom_caskfiles_to_jsonvoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.



43
44
45
46
47
48
49
50
51
# File 'cmd/update-report.rb', line 43

def migrate_caskroom_caskfiles_to_json
  return unless Cask::Caskroom.path.directory?

  Cask::Caskroom.path.glob("*/.metadata/*/*/Casks/*.{json,rb}").each do |caskfile|
    Cask::Caskroom.migrate_caskfile_to_json(caskfile)
  rescue => e
    opoo "Failed to migrate #{caskfile} to JSON metadata: #{e}"
  end
end

#runvoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.



34
35
36
37
38
39
40
# File 'cmd/update-report.rb', line 34

def run
  return output_update_report if $stdout.tty?

  redirect_stdout($stderr) do
    output_update_report
  end
end