Skip to content

Commit abb793a

Browse files
committed
Fix version resolution in CLI
This was broken in quarkusio#49926 where the property name was changed mistakenly. To be honest, I'm also not sure the new method is as safe as it used to be, especially on Windows as we also dropped the specific handling of the jar pattern. There was a specific comment about it in the preexisting method. I suppose we will see how it goes...
1 parent 1a4c49d commit abb793a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

devtools/cli-common/src/main/java/io/quarkus/cli/common/VersionHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static String clientVersion() {
3434
props.load(is);
3535
}
3636
}
37-
version = props.getProperty("quarkus.version", "999-SNAPSHOT");
37+
version = props.getProperty("quarkus-core-version", "999-SNAPSHOT");
3838
} catch (Exception e) {
3939
version = "999-SNAPSHOT"; // fallback version
4040
}

devtools/cli/src/test/java/io/quarkus/cli/CliVersionTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public void testCommandVersion() throws Exception {
1818
"Version output for command aliases should be the same.");
1919

2020
CliDriver.Result result2 = CliDriver.execute(workspaceRoot, "--version");
21+
result2.echoSystemOut();
2122
Assertions.assertEquals(result.stdout, result2.stdout, "Version output for command aliases should be the same.");
2223
}
2324
}

0 commit comments

Comments
 (0)