Skip to content

Don't install git hooks in GitLab CI#837

Merged
jasonforal merged 1 commit intomainfrom
jf/husky
Mar 5, 2026
Merged

Don't install git hooks in GitLab CI#837
jasonforal merged 1 commit intomainfrom
jf/husky

Conversation

@jasonforal
Copy link
Collaborator

@jasonforal jasonforal commented Mar 5, 2026

What problem are you trying to solve?

The GitLab CI jobs are broken because (despite being a dev-dependency), cargo-husky is trying to install Git hooks (which aren't necessary in CI):

error: failed to run custom build command for `cargo-husky v1.5.0`
Caused by:
  process didn't exit successfully: `/go/src/github.com/DataDog/datadog-static-analyzer/target/debug/build/cargo-husky-41338a31f91a71dd/build-script-build` (exit status: 1)
  --- stderr
  Error: IO error: No such file or directory (os error 2)

The runner environment has probably removed the .git directory.

What is your solution?

Disable cargo-husky's git hook installation

Testing

See equivalent CI run without this commit: https://github.com/DataDog/datadog-static-analyzer/tree/jf/husky-2

@jasonforal jasonforal requested a review from a team as a code owner March 5, 2026 16:38
@jasonforal jasonforal merged commit 5d22012 into main Mar 5, 2026
50 of 53 checks passed
@jasonforal jasonforal deleted the jf/husky branch March 5, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants