Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2623

Karaf client script only returns a non zero status if there is exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0, 3.0.1, 2.3.5, 4.0.0.M3
    • None
    • None

    Description

      When connecting to karaf using the client script and executing commands a non zero return code is only returned if an exception occurs, however it would be useful to return a non zero return for other errors as well.

      For example if the following command is run a non zero return code is returned:

      [jsherman@oxygen bin]$ ./client -u admin -p admin1 features:install wrapper
      Authentication failure
      [jsherman@oxygen bin]$ echo $?
      1
      

      However, the following command also had a failure but the client script returns zero indicating it was successful:

      [jsherman@oxygen bin]$ ./client -u admin -p admin features:install wraper
      Error executing command: No feature named 'wraper' with version '0.0.0' available
      [jsherman@oxygen bin]$ echo $?
      0
      [jsherman@oxygen bin]$
      

      It would be nice to know that command resulted in an error.

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            jsherman1 Jason Sherman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: