Skip to content

Commit 6a8f027

Browse files
authored
Fix wildcard version check for foreign executables. (#2848)
2 parents 1104073 + 1e1c92f commit 6a8f027

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ This document is intended for Spotless developers.
1010
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
1111

1212
## [Unreleased]
13+
### Fixed
14+
- Fix the ability to specify a wildcard version (`*`) for external formatter executables, which did not work. ([#2848](https://github.com/diffplug/spotless/pull/2848))
1315

1416
## [4.3.0] - 2026-01-27
1517
### Added

lib/src/main/java/com/diffplug/spotless/ForeignExe.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2025 DiffPlug
2+
* Copyright 2020-2026 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -112,7 +112,7 @@ public String confirmVersionAndGetAbsolutePath() throws IOException, Interrupted
112112
throw cantFind("Unable to parse version with /" + versionRegex + "/", cmdVersion);
113113
}
114114
String versionFound = versionMatcher.group(1);
115-
if (!VERSION_WILDCARD.equals(versionFound) && !versionFound.equals(version)) {
115+
if (!VERSION_WILDCARD.equals(version) && !versionFound.equals(version)) {
116116
throw wrongVersion("You specified version " + version + ", but Spotless found " + versionFound, cmdVersion, versionFound);
117117
}
118118
return exeAbsPath;

plugin-gradle/CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`).
44

55
## [Unreleased]
6+
### Fixed
7+
- Fix the ability to specify a wildcard version (`*`) for external formatter executables, which did not work. ([#2848](https://github.com/diffplug/spotless/pull/2848))
68

79
## [8.2.1] - 2026-01-27
810
### Fixed

plugin-maven/CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
44

55
## [Unreleased]
6+
### Fixed
7+
- Fix the ability to specify a wildcard version (`*`) for external formatter executables, which did not work. ([#2848](https://github.com/diffplug/spotless/pull/2848))
68

79
## [3.2.1] - 2026-01-27
810
### Fixed

0 commit comments

Comments
 (0)