Skip to content

Commit

Permalink
Merge pull request #17170 from alebcay/backtrace-strict-typing
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Apr 28, 2024
2 parents 6d7b506 + 783e72d commit c26d10e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Library/Homebrew/utils/backtrace.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# typed: true
# typed: strict
# frozen_string_literal: true

module Utils
module Backtrace
@print_backtrace_message = T.let(false, T::Boolean)

# Cleans `sorbet-runtime` gem paths from the backtrace unless...
# 1. `verbose` is set
# 2. first backtrace line starts with `sorbet-runtime`
Expand All @@ -22,7 +24,7 @@ def self.clean(error)

sig { returns(String) }
def self.sorbet_runtime_path
@sorbet_runtime_path ||= "#{Gem.paths.home}/gems/sorbet-runtime"
@sorbet_runtime_path ||= T.let("#{Gem.paths.home}/gems/sorbet-runtime", T.nilable(String))
end

sig { void }
Expand Down

0 comments on commit c26d10e

Please sign in to comment.