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

(7.1.0) CLI returns always "0" if CLI is started with "cmd /c " on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 7.1.0.DR17
    • 7.1.0.DR16
    • CLI, Scripts
    • None

      Description of problem:
      CLI returns always "0" if CLI is started with "cmd /c " on Windows

      This issue is regression against EAP 7.0.0, but priority of this jira is not blocker, because this issue is corner case.

      Steps to Reproduce:

      1. jboss-cli.bat --command=version_error
      2. echo Exit Code is %errorlevel%
      3. REM verify correct return value: 1
      4. cmd /c jboss-cli.bat --command=version_error
      5. echo Exit Code is %errorlevel%
      6. REM return value is 0 in EAP 7.1.0.DR16. Correct return value should be 1

      Actual results:

      C:\Users\Administrator\playground\7.1.0.DR16\jboss-eap-7.1\bin>jboss-cli.bat --command=version_error
      Unexpected command 'version_error'. Type 'help --commands' for the list of supported commands.
      
      C:\Users\Administrator\playground\7.1.0.DR16\jboss-eap-7.1\bin>echo Exit Code is %errorlevel%
      Exit Code is 1
      
      C:\Users\Administrator\playground\7.1.0.DR16\jboss-eap-7.1\bin>
      
      
      C:\Users\Administrator\playground\7.1.0.DR16\jboss-eap-7.1\bin>cmd /c jboss-cli.bat --command=version_error
      Unexpected command 'version_error'. Type 'help --commands' for the list of supported commands.
      
      C:\Users\Administrator\playground\7.1.0.DR16\jboss-eap-7.1\bin>echo Exit Code is %errorlevel%
      Exit Code is 0
      
      C:\Users\Administrator\playground\7.1.0.DR16\jboss-eap-7.1\bin>
      

      Expected results:

      C:\Users\Administrator\playground\7.0.0\jboss-eap-7.0\bin>jboss-cli.bat --command=version_error
      Unexpected command 'version_error'. Type 'help --commands' for the list of supported commands.
      
      C:\Users\Administrator\playground\7.0.0\jboss-eap-7.0\bin>echo Exit Code is %errorlevel%
      Exit Code is 1
      
      C:\Users\Administrator\playground\7.0.0\jboss-eap-7.0\bin>
      
      
      C:\Users\Administrator\playground\7.0.0\jboss-eap-7.0\bin>cmd /c jboss-cli.bat --command=version_error
      Unexpected command 'version_error'. Type 'help --commands' for the list of supported commands.
      
      C:\Users\Administrator\playground\7.0.0\jboss-eap-7.0\bin>echo Exit Code is %errorlevel%
      Exit Code is 1
      
      C:\Users\Administrator\playground\7.0.0\jboss-eap-7.0\bin>
      

      Additional info:
      We see this issue also if jboss-cli.bat script is called from groovy or java

              jdenise@redhat.com Jean Francois Denise
              mkopecky@redhat.com Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: