Skip to content

Commit ac5a9ac

Browse files
authored
Merge pull request #99 from gsteel/git-config-patch
Git safe-directory fix
2 parents 7608d35 + e0e5cba commit ac5a9ac

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ COPY setup/markdownlint/problem-matcher.json /etc/laminas-ci/problem-matcher/mar
242242
COPY setup/phpunit/problem-matcher.json /etc/laminas-ci/problem-matcher/phpunit.json
243243

244244

245-
RUN useradd -ms /bin/bash testuser \
246-
&& sudo -u testuser git config --global --add safe.directory '*'
245+
RUN useradd -ms /bin/bash testuser
247246

248247
ENTRYPOINT ["entrypoint.sh"]

entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ update-alternatives --quiet --set php-config "/usr/bin/php-config${PHP}"
144144
update-alternatives --quiet --set phpize "/usr/bin/phpize${PHP}"
145145
update-alternatives --quiet --set phpdbg "/usr/bin/phpdbg${PHP}"
146146

147+
# Marks the working directory as safe for the current user prior to checkout
148+
git config --global --add safe.directory '*'
147149
checkout
148150

149151
# Is there a pre-install script available?

0 commit comments

Comments
 (0)