Skip to content

Commit

Permalink
pre-commit: require mvn in CI (#50401)
Browse files Browse the repository at this point in the history
  • Loading branch information
postamar authored Dec 23, 2024
1 parent 666e847 commit 668409a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ repos:

- id: spotless
name: Format Java files with Spotless
entry: bash -c 'command -v mvn >/dev/null 2>&1 || { echo "Maven not installed, skipping spotless" >&2; exit 0; }; mvn -f spotless-maven-pom.xml spotless:apply'
entry: bash -c 'command -v mvn >/dev/null 2>&1 || { if [ -z "$CI" ]; then echo "Maven not installed, skipping spotless" >&2; exit 0; fi }; mvn -f spotless-maven-pom.xml spotless:apply'
language: system
files: \.(java|kt|gradle)$
pass_filenames: false

0 comments on commit 668409a

Please sign in to comment.