fix: update git config to handle the necessary user name and email se… (#9975)

This commit is contained in:
greese-insight 2025-08-06 14:25:26 -04:00 committed by GitHub
parent 59ecf5515e
commit 37cebc1f8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -363,20 +363,21 @@ class ActionExecutor:
'$env:GIT_CONFIG = (Join-Path (Get-Location) ".git_config")'
)
else:
# Linux/macOS, local
base_git_config = (
f'git config --file ./.git_config user.name "{self.git_user_name}" && '
f'git config --file ./.git_config user.email "{self.git_user_email}" && '
'export GIT_CONFIG=$(pwd)/.git_config'
INIT_COMMANDS.append(
f'git config --file ./.git_config user.name "{self.git_user_name}"'
)
INIT_COMMANDS.append(base_git_config)
INIT_COMMANDS.append(
f'git config --file ./.git_config user.email "{self.git_user_email}"'
)
INIT_COMMANDS.append('export GIT_CONFIG=$(pwd)/.git_config')
else:
# Non-local (implies Linux/macOS)
base_git_config = (
f'git config --global user.name "{self.git_user_name}" && '
INIT_COMMANDS.append(
f'git config --global user.name "{self.git_user_name}"'
)
INIT_COMMANDS.append(
f'git config --global user.email "{self.git_user_email}"'
)
INIT_COMMANDS.append(base_git_config)
# Determine no-pager command
if is_windows: