Skip to content

Commit 4ed4f04

Browse files
authored
fix: Implement --version flag output in JabKit CLI (#14431)
Previously, running `jabkit --version` produced no output. This fix adds logic in the run() method to check if the versionInfoRequested flag is set. When true, it outputs just the version string (e.g., "6.0-alpha.197--2025-11-24--0a9793a") and returns early. Fixes #14428
1 parent 939b018 commit 4ed4f04

File tree

1 file changed

+4
-0
lines changed
  • jabkit/src/main/java/org/jabref/toolkit/commands

1 file changed

+4
-0
lines changed

jabkit/src/main/java/org/jabref/toolkit/commands/JabKit.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ public JabKit(CliPreferences cliPreferences, BibEntryTypesManager entryTypesMana
7777

7878
@Override
7979
public void run() {
80+
if (versionInfoRequested) {
81+
System.out.println(new BuildInfo().version);
82+
return;
83+
}
8084
System.out.printf(BuildInfo.JABREF_BANNER + "%n", new BuildInfo().version);
8185
}
8286

0 commit comments

Comments
 (0)