Merge pull request #4161 from alyssais/pull-gpg
Fix brew pull with git commit.gpgsign enabled
This commit is contained in:
commit
63ffbd3298
@ -102,6 +102,20 @@ module Homebrew
|
||||
ENV["GIT_COMMITTER_EMAIL"] = ENV["HOMEBREW_GIT_EMAIL"]
|
||||
end
|
||||
|
||||
# Depending on user configuration, git may try to invoke gpg.
|
||||
if Utils.popen_read("git config --get --bool commit.gpgsign").chomp == "true"
|
||||
begin
|
||||
gnupg = Formula["gnupg"]
|
||||
rescue FormulaUnavailableError # rubocop:disable Lint/HandleExceptions
|
||||
else
|
||||
if gnupg.installed?
|
||||
path = PATH.new(ENV.fetch("PATH"))
|
||||
path.prepend(gnupg.installed_prefix/"bin")
|
||||
ENV["PATH"] = path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
do_bump = @args.bump? && !@args.clean?
|
||||
|
||||
# Formulae with affected bottles that were published
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user