Fix git safe-directory path for docker images

This commit is contained in:
Eric Huss 2024-07-16 17:42:25 -07:00
parent 7d356ebde3
commit 572ba97f10

View File

@ -19,7 +19,7 @@ if [ "$NO_CHANGE_USER" = "" ]; then
# already be running with the right user.
#
# For NO_CHANGE_USER done in the small number of Dockerfiles affected.
echo -e '[safe]\n\tdirectory = *' > /home/user/gitconfig
echo -e '[safe]\n\tdirectory = *' > /home/user/.gitconfig
exec su --preserve-environment -c "env PATH=$PATH \"$0\"" user
fi