0
0
mirror of https://github.com/thegeeklab/wp-git-action.git synced 2024-11-22 00:00:39 +00:00

fix: ensure to remove GIT_COMMIT_* env vars to avoid config overlapping (#6)

This commit is contained in:
Robert Kaussow 2022-11-29 11:12:03 +01:00 committed by GitHub
parent 11a510b5ae
commit 686de4edfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}