1
0
mirror of synced 2025-12-19 18:14:56 -05:00

chore(pre-commit): fail if mvn is not installed, add brew install maven to Makefile (#53175)

This commit is contained in:
Natik Gadzhi
2025-02-04 15:46:36 -08:00
committed by GitHub
parent 80c1713db8
commit 5531157f83
2 changed files with 2 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ repos:
- id: spotless
name: Format Java files with Spotless
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'
entry: bash -c 'command -v mvn >/dev/null 2>&1 || { echo "Maven not installed. Install with brew install maven" >&2; exit 1; }; mvn -f spotless-maven-pom.xml spotless:apply'
language: system
files: \.(java|kt|gradle)$
pass_filenames: false

View File

@@ -36,7 +36,7 @@ tools.pre-commit.install.Linux:
tools.pre-commit.install.Darwin:
@echo "Installing pre-commit with brew..."
@brew install pre-commit
@brew install pre-commit maven
@echo "Pre-commit installation complete"
tools.git-hooks.install: tools.airbyte-ci.install tools.pre-commit.install.$(OS) tools.git-hooks.clean ## Setup pre-commit hooks