From dcdefaf5ae5fc084bb6225bcc227afb456ad709e Mon Sep 17 00:00:00 2001 From: Paul Dingemans Date: Sun, 3 Dec 2023 11:57:52 +0100 Subject: [PATCH] Fix path to ktlint JAR file in `ktlint.bat` (#2408) Closes #2402 --- ktlint-cli/src/main/scripts/ktlint.bat | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ktlint-cli/src/main/scripts/ktlint.bat b/ktlint-cli/src/main/scripts/ktlint.bat index 882536b812..55467be651 100644 --- a/ktlint-cli/src/main/scripts/ktlint.bat +++ b/ktlint-cli/src/main/scripts/ktlint.bat @@ -1,7 +1,8 @@ @echo off -REM By default this batch file and the "ktlint.jar" are located in same directory. Please adjust path below when this batch -REM file and the jar file are located in different directories. -if not defined JAR_PATH set JAR_PATH=.\ktlint.jar +REM By default this batch file and the "ktlint" are located in same directory. Note that "ktlint" is a JAR +REM despite it is not being suffixed with extension ".jar". Please adjust path below when this batch file +REM and the jar file are located in different directories. +if not defined JAR_PATH set JAR_PATH=.\ktlint REM The --add-opens argument is needed for java 16+ (see https://github.com/pinterest/ktlint/issues/1986) java --add-opens=java.base/java.lang=ALL-UNNAMED -jar "%JAR_PATH%" %*