Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-594

Artemis CLI returns 0 even when incorrect options are passed

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • A-MQ 7.0.0.ER17
    • None
    • None

      If you pass an invalid option to Artemis CLI, it will return 0.

      Here's an example:

      ./artemis create --force ---allow-anonymous --password=admin --http-host 0.0.0.0 --password "" --aio --role=admin --user=admin --java-options="" --name=amq /home/jamq/runtime-aio-baselineiii ; echo $?
      Found unexpected parameters: [---allow-anonymous]

      usage: artemis <command> [<args>]

      The most commonly used artemis commands are:
      address Address tools group (create|delete|update|show) (example ./artemis address create)
      browser It will send consume messages from an instance
      consumer It will send consume messages from an instance
      create creates a new broker instance
      data data tools group (print) (example ./artemis data print)
      help Display help information
      mask mask a password and print it out
      migrate1x Migrates the configuration of a 1.x Artemis Broker
      producer It will send messages to an instance
      queue Queue tools group (create|delete|update) (example ./artemis queue create)

      See 'artemis help <command>' for more information on a specific command.

      0

      A more adequate approach would be to return an error code to the OS. Among other things, this help users automating the creation of instances if they make a mistake.

              rh-ee-ataylor Andy Taylor
              opiske Otavio Piske
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: