diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index 79db0ede47a37..af8bec643791d 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -24,6 +24,9 @@ class Parser }.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 diff --git a/Library/Homebrew/extend/os/linux/parser.rb b/Library/Homebrew/extend/os/linux/parser.rb index 37f8481e18865..7573d9e22f891 100644 --- a/Library/Homebrew/extend/os/linux/parser.rb +++ b/Library/Homebrew/extend/os/linux/parser.rb @@ -1,4 +1,4 @@ -# typed: true # rubocop:todo Sorbet/StrictSigil +# typed: strict # frozen_string_literal: true module Homebrew @@ -10,13 +10,13 @@ module ParserLinux 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.