cmd/tap: ensure remote exists before repairing

This commit is contained in:
EricFromCanada 2023-07-23 00:11:41 -04:00
parent fe7aa4b614
commit d47aa103d2
No known key found for this signature in database
GPG Key ID: 179D9CDDDB814168

View File

@ -419,6 +419,7 @@ class Tap
end
$stderr.ohai "#{name}: changed remote from #{remote} to #{requested_remote}" unless quiet
end
return unless remote
current_upstream_head = T.must(git_repo.origin_branch_name)
return if requested_remote.blank? && git_repo.origin_has_branch?(current_upstream_head)