Skip to content

Commit

Permalink
pull: set env GIT_COMMITTER_* before git am
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters committed Nov 26, 2017
1 parent 86305f7 commit ba175a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Library/Homebrew/dev-cmd/pull.rb
Expand Up @@ -340,6 +340,15 @@ def apply_patch
patch_args << "-3"
patch_args << patchpath

# git am sometimes needs GIT_COMMITTER_EMAIL to be set
# https://github.com/Homebrew/homebrew-test-bot/issues/131

This comment has been minimized.

Copy link
@MikeMcQuaid

MikeMcQuaid Nov 26, 2017

Can skip the link and put this near the top of def pull so it's only set once.

if ENV["HOMEBREW_GIT_NAME"]
ENV["GIT_COMMITTER_NAME"] = ENV["HOMEBREW_GIT_NAME"]
end
if ENV["HOMEBREW_GIT_EMAIL"]
ENV["GIT_COMMITTER_EMAIL"] = ENV["HOMEBREW_GIT_EMAIL"]
end

begin
safe_system "git", "am", *patch_args
rescue ErrorDuringExecution
Expand Down

0 comments on commit ba175a5

Please sign in to comment.