Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix path to ktlint JAR file in ktlint.bat #2408

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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%" %*