Skip to content

Commit 1f1c66d

Browse files
committed
Fix Groovy
1 parent 3ec65a1 commit 1f1c66d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.enforcer-scripts/validate-jbang-versions.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jbangFile.eachLine { line ->
2121
if (line.trim().startsWith(groupPrefix)) {
2222
def lastColon = line.lastIndexOf(":")
2323
if (lastColon != -1) {
24-
def actualVersion = line.substring(lastColon + 1).trim()
24+
def actualVersion = line.substring(lastColon + 1).trim().tokenize()[0]
2525
if (actualVersion != expectedVersion) {
2626
System.err.println("[ERROR] JBang Version Mismatch in " + scriptName)
2727
System.err.println(" Expected: " + expectedVersion)
28-
System.err.println(" Found: " + actualVersion)
28+
System.err.println(" Found: " + actualVersion + " in line: \"" + line.trim() + "\"")
2929
success = false
3030
}
3131
}

0 commit comments

Comments
 (0)