brusdev commented on code in PR #5127:
URL: https://github.com/apache/activemq-artemis/pull/5127#discussion_r1705207850
##########
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Shell.java:
##########
@@ -122,7 +125,22 @@ public static void runShell(boolean printBanner) {
systemRegistry.setCommandRegistries(new
PicocliCommands(Artemis.buildCommand(isInstance, !isInstance, false)));
systemRegistry.cleanUp();
line = reader.readLine(prompt, rightPrompt,
(MaskingCallback) null, null);
- systemRegistry.execute(line);
+
+ if (isInstance && line.startsWith("run")) {
+ List<String> command = new ArrayList<>();
+ boolean IS_WINDOWS =
System.getProperty("os.name").toLowerCase().trim().startsWith("win");
+ if (IS_WINDOWS) {
+ command.add("cmd");
+ command.add("/c");
+ command.add(Paths.get(artemisInstance,
"artemis.cmd").toAbsolutePath().toString());
+ } else {
+ command.add(Paths.get(artemisInstance, "bin",
"artemis").toAbsolutePath().toString());
+ }
+ command.addAll(parser.parse(line, 0).words());
+ new ProcessBuilder(command).inheritIO().start().waitFor();
Review Comment:
I'll remove this part.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact