Fix module_function errors
This commit is contained in:
parent
1c44a8861d
commit
54fad14ff3
@ -6,10 +6,8 @@ require "cli/parser"
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def __prefix_args
|
||||
def self.__prefix_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
description <<~EOS
|
||||
Display Homebrew's install path. *Default:*
|
||||
@ -30,7 +28,7 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
def __prefix
|
||||
def self.__prefix
|
||||
args = __prefix_args.parse
|
||||
|
||||
raise UsageError, "`--installed` requires a formula argument." if args.installed? && args.no_named?
|
||||
@ -89,7 +87,7 @@ module Homebrew
|
||||
texlive/*
|
||||
].freeze
|
||||
|
||||
def list_unbrewed
|
||||
def self.list_unbrewed
|
||||
dirs = HOMEBREW_PREFIX.subdirs.map { |dir| dir.basename.to_s }
|
||||
dirs -= %w[Library Cellar Caskroom .git]
|
||||
|
||||
|
||||
@ -6,10 +6,8 @@ require "cli/parser"
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
|
||||
module_function
|
||||
|
||||
sig { returns(CLI::Parser) }
|
||||
def log_args
|
||||
def self.log_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
description <<~EOS
|
||||
Show the `git log` for <formula> or <cask>, or show the log for the Homebrew repository
|
||||
@ -37,7 +35,7 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
def log
|
||||
def self.log
|
||||
args = log_args.parse
|
||||
|
||||
# As this command is simplifying user-run commands then let's just use a
|
||||
@ -53,7 +51,7 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
def git_log(cd_dir, path = nil, tap = nil, args:)
|
||||
def self.git_log(cd_dir, path = nil, tap = nil, args:)
|
||||
cd cd_dir do
|
||||
repo = Utils.popen_read("git", "rev-parse", "--show-toplevel").chomp
|
||||
if tap
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user