enable typing in --env
This commit is contained in:
		
							parent
							
								
									e63111a7b5
								
							
						
					
					
						commit
						b7d2953412
					
				@ -296,7 +296,9 @@ module Homebrew
 | 
			
		||||
        [remaining, non_options]
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      sig { params(argv: T::Array[String], ignore_invalid_options: T::Boolean).returns(Args) }
 | 
			
		||||
      # @return [Args] The actual return type is `Args`, but since `Args` uses `method_missing` to handle options, the
 | 
			
		||||
      #   `sig` annotates this as returning `T.untyped` to avoid spurious type errors.
 | 
			
		||||
      sig { params(argv: T::Array[String], ignore_invalid_options: T::Boolean).returns(T.untyped) }
 | 
			
		||||
      def parse(argv = ARGV.freeze, ignore_invalid_options: false)
 | 
			
		||||
        raise "Arguments were already parsed!" if @args_parsed
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
# typed: false
 | 
			
		||||
# typed: strict
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
require "extend/ENV"
 | 
			
		||||
 | 
			
		||||
@ -36,6 +36,7 @@ end
 | 
			
		||||
 | 
			
		||||
module EnvActivation
 | 
			
		||||
  include EnvMethods
 | 
			
		||||
  include Superenv
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
class Sorbet
 | 
			
		||||
 | 
			
		||||
@ -19,7 +19,7 @@ begin
 | 
			
		||||
 | 
			
		||||
  trap("INT", old_trap)
 | 
			
		||||
 | 
			
		||||
  formula = T.must(args.named.to_resolved_formulae.first)
 | 
			
		||||
  formula = args.named.to_resolved_formulae.first
 | 
			
		||||
  formula.extend(Debrew::Formula) if args.debug?
 | 
			
		||||
  formula.run_post_install
 | 
			
		||||
rescue Exception => e # rubocop:disable Lint/RescueException
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user