From 686de4edfd5c5b8bbd1b0a0f988c73b590ee565e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 29 Nov 2022 11:12:03 +0100 Subject: [PATCH] fix: ensure to remove GIT_COMMIT_* env vars to avoid config overlapping (#6) --- plugin/impl.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugin/impl.go b/plugin/impl.go index 9d9c325..0fd6276 100644 --- a/plugin/impl.go +++ b/plugin/impl.go @@ -64,7 +64,15 @@ func (p *Plugin) Validate() error { // Execute provides the implementation of the plugin. func (p *Plugin) Execute() error { - for _, env := range []string{"GIT_AUTHOR_NAME", "GIT_AUTHOR_EMAIL"} { + gitEnv := []string{ + "GIT_AUTHOR_NAME", + "GIT_AUTHOR_EMAIL", + "GIT_AUTHOR_DATE", + "GIT_COMMITTER_NAME", + "GIT_COMMITTER_EMAIL", + "GIT_COMMITTER_DATE", + } + for _, env := range gitEnv { if err := os.Unsetenv(env); err != nil { return err }