mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix: update git config to handle the necessary user name and email se… (#9975)
This commit is contained in:
parent
59ecf5515e
commit
37cebc1f8f
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user