Enable types in brew.rb
This commit is contained in:
parent
6dc20d253a
commit
2969cdb5c1
@ -1,6 +1,7 @@
|
||||
# typed: false
|
||||
# typed: true
|
||||
# frozen_string_literal: true
|
||||
|
||||
# `HOMEBREW_STACKPROF` should be set via `brew prof --stackprof`, not manually.
|
||||
if ENV["HOMEBREW_STACKPROF"]
|
||||
require "rubygems"
|
||||
require "stackprof"
|
||||
@ -35,8 +36,8 @@ begin
|
||||
empty_argv = ARGV.empty?
|
||||
help_flag_list = %w[-h --help --usage -?]
|
||||
help_flag = !ENV["HOMEBREW_HELP"].nil?
|
||||
help_cmd_index = nil
|
||||
cmd = nil
|
||||
help_cmd_index = T.let(nil, T.nilable(Integer))
|
||||
cmd = T.let(nil, T.nilable(String))
|
||||
|
||||
ARGV.each_with_index do |arg, i|
|
||||
break if help_flag && cmd
|
||||
@ -64,7 +65,7 @@ begin
|
||||
path.prepend(HOMEBREW_SHIMS_PATH/"shared")
|
||||
homebrew_path.prepend(HOMEBREW_SHIMS_PATH/"shared")
|
||||
|
||||
ENV["PATH"] = path
|
||||
ENV["PATH"] = path.to_s
|
||||
|
||||
require "commands"
|
||||
require "settings"
|
||||
@ -76,7 +77,7 @@ begin
|
||||
homebrew_path.append(Tap.cmd_directories)
|
||||
|
||||
# External commands expect a normal PATH
|
||||
ENV["PATH"] = homebrew_path
|
||||
ENV["PATH"] = homebrew_path.to_s
|
||||
end
|
||||
|
||||
# Usage instructions should be displayed if and only if one of:
|
||||
|
@ -4,6 +4,8 @@
|
||||
# This is an autogenerated file for types exported from the `stackprof` gem.
|
||||
# Please instead update this file by running `bin/tapioca gem stackprof`.
|
||||
|
||||
# Note that since `stackprof` is not managed in a `Gemfile`, we can't put this in the `sorbet/rbi/gems` folder.
|
||||
|
||||
# source://stackprof//lib/stackprof.rb#11
|
||||
module StackProf
|
||||
class << self
|
||||
|
Loading…
x
Reference in New Issue
Block a user