Skip to content

Commit

Permalink
fix: fixes duplicate classpath entries
Browse files Browse the repository at this point in the history
Running `info classpath` on a GAV would return a result with duplicate
artifacts. This is now fixed.

See #1557
  • Loading branch information
quintesse committed Feb 7, 2023
1 parent 098d7fe commit 465c941
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/dev/jbang/cli/Info.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public Integer doCall() throws IOException {

ScriptInfo info = getInfo();
List<String> cp = new ArrayList<>(info.resolvedDependencies.size() + 1);
if (info.applicationJar != null) {
if (info.applicationJar != null && !info.resolvedDependencies.contains(info.applicationJar)) {
cp.add(info.applicationJar);
}
cp.addAll(info.resolvedDependencies);
Expand Down

0 comments on commit 465c941

Please sign in to comment.