Skip to content

Commit 72bafd8

Browse files
committed
Kotlin: Tweak the regex we use to find the installed Kotlin version
1 parent 452b68c commit 72bafd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/kotlin-extractor/kotlin_plugin_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def get_single_version(fakeVersionOutput = None):
5858
if kotlinc is None:
5959
raise KotlincNotFoundException()
6060
versionOutput = subprocess.run([kotlinc, '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stderr if fakeVersionOutput is None else fakeVersionOutput
61-
m = re.match(r'.* kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+-?[a-zA-Z]*) .*', versionOutput)
61+
m = re.match(r'.* kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z][a-zA-Z0-9]*)?) .*', versionOutput)
6262
if m is None:
6363
raise Exception('Cannot detect version of kotlinc (got ' + str(versionOutput) + ')')
6464
current_version = version_string_to_version(m.group(1))

0 commit comments

Comments
 (0)