Skip to content

Commit

Permalink
ARTEMIS-4974 Removing Run from Shell
Browse files Browse the repository at this point in the history
  • Loading branch information
clebertsuconic authored and gemmellr committed Aug 6, 2024
1 parent be4995a commit 5ab9765
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ public static CommandLine buildCommand(boolean includeInstanceCommands, boolean
commandLine.addSubcommand(new DataGroup(commandLine));
commandLine.addSubcommand(new UserGroup(commandLine));

commandLine.addSubcommand(new Run());
if (!Shell.inShell()) {
commandLine.addSubcommand(new Run());
}

commandLine.addSubcommand(new Stop());
commandLine.addSubcommand(new Kill());
commandLine.addSubcommand(new PerfJournal());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
import org.apache.activemq.artemis.api.core.Pair;
import org.apache.activemq.artemis.cli.Artemis;
import org.apache.activemq.artemis.cli.Shell;
import org.apache.activemq.artemis.cli.Terminal;
import org.apache.activemq.artemis.cli.commands.tools.LockAbstract;
import org.apache.activemq.artemis.cli.factory.BrokerFactory;
import org.apache.activemq.artemis.cli.factory.jmx.ManagementFactory;
Expand Down Expand Up @@ -76,17 +74,6 @@ public static void setEmbedded(boolean embedded) {

@Override
public Object execute(ActionContext context) throws Exception {

if (Shell.inShell()) {

String scriptStart = "./artemis";
if (System.getProperty("os.name", "linux").toLowerCase().trim().startsWith("win")) {
scriptStart = "artemis.cmd";
}
System.out.println(Terminal.RED_UNICODE + "ERROR: The run command is not supported in the artemis shell. Please use '" + scriptStart + " run' directly." + Terminal.CLEAR_UNICODE);
return null;
}

super.execute(context);

verifyOlderLogging(new File(getBrokerEtc()));
Expand Down

0 comments on commit 5ab9765

Please sign in to comment.