Skip to content

Commit

Permalink
Fix path to ktlint JAR file in ktlint.bat (pinterest#2408)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-dingemans authored Dec 3, 2023
1 parent 814a126 commit dcdefaf
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 dcdefaf

Please sign in to comment.