Skip to content

Commit c3f8dd4

Browse files
authored
fix: Fixed git fatal error in Dockerfile (antonbabenko#372)
1 parent cee7608 commit c3f8dd4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/.container-structure-test-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
schemaVersion: '2.0.0'
22
commandTests:
3+
- name: "git"
4+
command: "git"
5+
args: ["--version"]
6+
expectedOutput: ["^git version 2\\.[0-9]+\\.[0-9]+\\n$"]
7+
38
- name: "pre-commit"
49
command: "pre-commit"
510
args: ["-V"]

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ RUN if [ "$(grep -o '^terraform-docs SKIPPED$' /usr/bin/tools_versions_info)" =
182182
; fi && \
183183
if [ "$(grep -o '^infracost SKIPPED$' /usr/bin/tools_versions_info)" = "" ]; then \
184184
apk add --no-cache jq=~1 \
185-
; fi
185+
; fi && \
186+
# Fix git runtime fatal:
187+
# unsafe repository ('/lint' is owned by someone else)
188+
git config --global --add safe.directory /lint
186189

187190
ENV PRE_COMMIT_COLOR=${PRE_COMMIT_COLOR:-always}
188191

0 commit comments

Comments
 (0)