Skip to content

Commit

Permalink
Enable typing in Homebrew::Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
dduugg committed Feb 14, 2023
1 parent c87090e commit 677e12a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/upgrade.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: false
# typed: true
# frozen_string_literal: true

require "reinstall"
Expand Down Expand Up @@ -209,7 +209,7 @@ def install_formula(formula_installer, upgrade:)
ensure
# restore previous installation state if build failed
begin
linked_kegs.each(&:link) if linked_kegs.present? && !f.latest_version_installed?
linked_kegs&.each(&:link) unless formula.latest_version_installed?
rescue
nil
end
Expand Down
5 changes: 5 additions & 0 deletions Library/Homebrew/upgrade.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# typed: strict

module Homebrew::Upgrade
include Kernel
end

0 comments on commit 677e12a

Please sign in to comment.