Skip to content

Commit 93e9078

Browse files
authored
fix: auto-build not needed for build (keycloak#26099)
closes keycloak#26075 Signed-off-by: Steve Hawkins <[email protected]>
1 parent ea5888e commit 93e9078

File tree

1 file changed

+4
-2
lines changed
  • quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/cli

1 file changed

+4
-2
lines changed

quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/cli/Picocli.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ private static boolean shouldSkipRebuild(List<String> cliArgs, String currentCom
166166
return cliArgs.contains("--help")
167167
|| cliArgs.contains("-h")
168168
|| cliArgs.contains("--help-all")
169+
|| currentCommandName.equals(Build.NAME)
169170
|| currentCommandName.equals(ShowConfig.NAME)
170171
|| currentCommandName.equals(Tools.NAME);
171172
}
@@ -217,13 +218,14 @@ private static int runReAugmentation(List<String> cliArgs, CommandLine cmd) {
217218

218219
List<String> configArgsList = new ArrayList<>(cliArgs);
219220

220-
configArgsList.replaceAll(arg -> replaceCommandWithBuild(getCurrentCommandSpec(cliArgs, cmd.getCommandSpec()).getCommandName(), arg));
221+
String commandName = getCurrentCommandSpec(cliArgs, cmd.getCommandSpec()).getCommandName();
222+
configArgsList.replaceAll(arg -> replaceCommandWithBuild(commandName, arg));
221223
configArgsList.removeIf(Picocli::isRuntimeOption);
222224

223225
exitCode = cmd.execute(configArgsList.toArray(new String[0]));
224226

225227
if(!isDevMode() && exitCode == cmd.getCommandSpec().exitCodeOnSuccess()) {
226-
cmd.getOut().printf("Next time you run the server, just run:%n%n\t%s %s %s %s%n%n", Environment.getCommand(), getCurrentCommandSpec(cliArgs, cmd.getCommandSpec()).getCommandName(), OPTIMIZED_BUILD_OPTION_LONG, String.join(" ", getSanitizedRuntimeCliOptions()));
228+
cmd.getOut().printf("Next time you run the server, just run:%n%n\t%s %s %s %s%n%n", Environment.getCommand(), commandName, OPTIMIZED_BUILD_OPTION_LONG, String.join(" ", getSanitizedRuntimeCliOptions()));
227229
}
228230

229231
return exitCode;

0 commit comments

Comments
 (0)