From 668409aab21f476fa70a8fb88b09804e69352d6d Mon Sep 17 00:00:00 2001 From: Marius Posta Date: Mon, 23 Dec 2024 12:34:53 -0500 Subject: [PATCH] pre-commit: require mvn in CI (#50401) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a394cc362a86..f98b3cb9b786 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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