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