File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,21 @@ timezone: Europe/Berlin
2121hooks :
2222 pre-start :
2323 - exec-host : python3 .ddev/php/create-xdebug-local.py
24+ # Add hosts git user name and email to ddev web container git config
25+ # we will write into homeadditionas to avoid issues when user.name or user.email are not set
26+ # path .ddev/homeadditions/.gitconfig will be created with proper permissions
27+
28+ - exec-host : |
29+ GIT_USER_NAME=$(git config --get user.name || echo "")
30+ GIT_USER_EMAIL=$(git config --get user.email || echo "")
31+ if [ -n "$GIT_USER_NAME" ] && [ -n "$GIT_USER_EMAIL" ]; then
32+ mkdir -p .ddev/homeadditions
33+ {
34+ echo "[user]"
35+ echo " name = $GIT_USER_NAME"
36+ echo " email = $GIT_USER_EMAIL"
37+ } > .ddev/homeadditions/.gitconfig
38+ fi
2439 post-start :
2540 - exec : yes | pnpm install
2641 - exec : composer install --prefer-dist --no-progress --no-interaction
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ psalm_sonar.json
1010.qodo
1111.vscode /tasks.json
1212.vscode /launch.json
13+ .ddev /homeadditions /.gitconfig
You can’t perform that action at this time.
0 commit comments