Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-924

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • M1
    • jboss-fuse-6.0
    • None
    • None
    • % %

      When running the client script it only returns a non zero return code if exception occurs, however if there is warning it returns 0.

      This can be problem when trying to automate some commands and the status code needs to be verified to confirm is the command was successful.

      For example running the the following command behaves as expected:

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

      However, if an invalid command is passed to the client to execute the script returns zero even though the command failed:

      [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]$ 
      

        1. client
          8 kB
        2. client.bat
          4 kB

            ggrzybek Grzegorz Grzybek
            rhn-support-jsherman Jason Sherman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: