Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-2318

CLI Lists in non-interactive mode are erroneously split into multiple commands

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 7.0.0.ER7
    • None
    • CLI
    • None
    • Hide

      Run: ./bin/jboss-cli.sh -c --controller=localhost --commands="module add --name=test --resources=test.jar --dependencies=dep1,dep2"

      Output:
      Unexpected command 'dep2'. Type 'help --commands' for the list of supported commands

      Show
      Run: ./bin/jboss-cli.sh -c --controller=localhost --commands="module add --name=test --resources=test.jar --dependencies=dep1,dep2" Output: Unexpected command 'dep2'. Type 'help --commands' for the list of supported commands

    Description

      The problem arises because commands entered in non-interactive mode are split by the "," character. Therefore, in the case of:

      "./bin/jboss-cli.sh -c --controller=localhost --commands="module add --name=test --resources=test.jar --dependencies=dep1,dep2"

      the cli is incorrectly splitting the request into two distinct commands:

      1. module add --name=test --resources=test.jar --dependencies=dep1
      2. dep2

      The reason this behaviour is not observed in interactive mode is because multiple commands can not be specified. However, in non-interactive mode --commands=ls,pwd is valid and should result in the execution of ls followed by pwd.

      This problem is not restricted to the module command, as it affects all commands entered in non-interactive mode that require a comma-separated list as an argument. So far this appears to be PatchHanlder.java, ASModuleHandler.java and DeploymentOverlayHandler.java.

      Attachments

        Issue Links

          Activity

            People

              remerson@redhat.com Ryan Emerson
              remerson@redhat.com Ryan Emerson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 8 minutes
                  8m