Skip to content

Commit

Permalink
fix: lint job exiting with 1
Browse files Browse the repository at this point in the history
In recent versions of Git, a security feature was introduced to prevent directory traversal attacks.
Git now verifies that the directory it’s operating on is “safe.”
If a repository resides in a directory owned by another user
(common in CI environments where repositories are checked out dynamically),
Git might refuse to operate unless explicitly configured.
  • Loading branch information
frncmx committed Jan 2, 2025
1 parent ec873d6 commit a337733
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Mark source directory as safe
run: git config --global --add safe.directory $GITHUB_WORKSPACE

- name: go.mod check
run: |
go mod tidy
Expand Down

0 comments on commit a337733

Please sign in to comment.