Skip to content

Commit

Permalink
Fix path to ktlint JAR file in ktlint.bat
Browse files Browse the repository at this point in the history
Closes #2402
  • Loading branch information
paul-dingemans committed Dec 3, 2023
1 parent c670818 commit c3c0548
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ktlint-cli/src/main/scripts/ktlint.bat
Original file line number Diff line number Diff line change
@@ -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%" %*

0 comments on commit c3c0548

Please # to comment.