Makes args readable
This commit is contained in:
parent
27e951c408
commit
7cd329c116
@ -24,6 +24,9 @@ module Homebrew
|
||||
}.freeze, T::Hash[Symbol, String])
|
||||
private_constant :ArgType, :HIDDEN_DESC_PLACEHOLDER, :SYMBOL_TO_USAGE_MAPPING
|
||||
|
||||
sig { returns(Args) }
|
||||
attr_reader :args
|
||||
|
||||
sig { returns(Args::OptionsType) }
|
||||
attr_reader :processed_options
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# typed: true # rubocop:todo Sorbet/StrictSigil
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Homebrew
|
||||
@ -10,13 +10,13 @@ module Homebrew
|
||||
|
||||
sig { void }
|
||||
def set_default_options
|
||||
@args["formula?"] = true if @args.respond_to?(:formula?)
|
||||
args["formula?"] = true if args.respond_to?(:formula?)
|
||||
end
|
||||
|
||||
sig { void }
|
||||
def validate_options
|
||||
return unless @args.respond_to?(:cask?)
|
||||
return unless @args.cask?
|
||||
return unless args.respond_to?(:cask?)
|
||||
return unless args.cask?
|
||||
|
||||
# NOTE: We don't raise an error here because we don't want
|
||||
# to print the help page or a stack trace.
|
||||
|
Loading…
x
Reference in New Issue
Block a user