pull: fix remote on jenkins

This commit is contained in:
Dawid Dziurla 2020-02-24 23:26:28 +01:00
parent 670227bdc8
commit f8863c8a3b
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -290,7 +290,8 @@ module Homebrew
# Use `homebrew` remote if HOMEBREW_FORCE_HOMEBREW_ON_LINUX env variable is set.
# The `homebrew` remote points to homebrew-core tap and is used by Linux maintainers.
# See https://docs.brew.sh/Homebrew-linuxbrew-core-Maintainer-Guide#preparation
remote = ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"] ? "homebrew" : "origin"
# Skip that on Jenkins, because upload job runs on Linux.
remote = (ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"] && ENV["JENKINS_HOME"].nil?) ? "homebrew" : "origin"
safe_system "git", "fetch", "--quiet", remote, "pull/#{pr_number}/head"
Utils.popen_read("git", "rev-list", "--parents", "-n1", "FETCH_HEAD").count(" ") > 1
end