Accumulo
  1. Accumulo
  2. ACCUMULO-1899

cli.Help should return non-zero status on error parsing args

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.5.1, 1.6.0
    • Component/s: None
    • Labels:

      Description

      Right now org.apache.accumulo.core.cli.Help.parseArgs() uses System.exit(0) on parse error.

      If the user gives invalid flags and triggers this code path, we should exit with non-zero status to indicate a problem.

      Previously (in 1.4.x), not properly setting non-zero status for command line parse errors caused some integration tests to fail silently for some time.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        9d 8h 6m 1 Morgan Haskel 25/Nov/13 03:51
        Patch Available Patch Available Resolved Resolved
        22m 17s 1 Josh Elser 25/Nov/13 04:14
        Christopher Tubbs made changes -
        Affects Version/s 1.6.0 [ 12322468 ]
        Hide
        ASF subversion and git services added a comment -

        Commit 100e75bece15ad2d223070912854430d078e587a in branch refs/heads/1.5.1-SNAPSHOT from Morgan Haskel
        [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=100e75b ]

        ACCUMULO-1899 exit with non-zero exit code if there's an error parsing the arguments.

        Signed-off-by: Josh Elser <elserj@apache.org>

        Show
        ASF subversion and git services added a comment - Commit 100e75bece15ad2d223070912854430d078e587a in branch refs/heads/1.5.1-SNAPSHOT from Morgan Haskel [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=100e75b ] ACCUMULO-1899 exit with non-zero exit code if there's an error parsing the arguments. Signed-off-by: Josh Elser <elserj@apache.org>
        Hide
        ASF subversion and git services added a comment -

        Commit 100e75bece15ad2d223070912854430d078e587a in branch refs/heads/master from Morgan Haskel
        [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=100e75b ]

        ACCUMULO-1899 exit with non-zero exit code if there's an error parsing the arguments.

        Signed-off-by: Josh Elser <elserj@apache.org>

        Show
        ASF subversion and git services added a comment - Commit 100e75bece15ad2d223070912854430d078e587a in branch refs/heads/master from Morgan Haskel [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=100e75b ] ACCUMULO-1899 exit with non-zero exit code if there's an error parsing the arguments. Signed-off-by: Josh Elser <elserj@apache.org>
        Josh Elser made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Josh Elser added a comment -

        Applied. Thanks for the patch, Morgan Haskel!

        Show
        Josh Elser added a comment - Applied. Thanks for the patch, Morgan Haskel !
        Hide
        ASF subversion and git services added a comment -

        Commit 100e75bece15ad2d223070912854430d078e587a in branch refs/heads/1.6.0-SNAPSHOT from Morgan Haskel
        [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=100e75b ]

        ACCUMULO-1899 exit with non-zero exit code if there's an error parsing the arguments.

        Signed-off-by: Josh Elser <elserj@apache.org>

        Show
        ASF subversion and git services added a comment - Commit 100e75bece15ad2d223070912854430d078e587a in branch refs/heads/1.6.0-SNAPSHOT from Morgan Haskel [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=100e75b ] ACCUMULO-1899 exit with non-zero exit code if there's an error parsing the arguments. Signed-off-by: Josh Elser <elserj@apache.org>
        Josh Elser made changes -
        Fix Version/s 1.5.1 [ 12324399 ]
        Fix Version/s 1.6.0 [ 12322468 ]
        Josh Elser made changes -
        Assignee Morgan Haskel [ mhaskel ]
        Morgan Haskel made changes -
        Attachment ACCUMULO-1899.patch [ 12615526 ]
        Morgan Haskel made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Morgan Haskel added a comment -

        The attached patch against 1.5.1-SNAPSHOT will make it exit with status 1 if there's an issue parsing the arguments.

        Show
        Morgan Haskel added a comment - The attached patch against 1.5.1-SNAPSHOT will make it exit with status 1 if there's an issue parsing the arguments.
        Sean Busbey created issue -

          People

          • Assignee:
            Morgan Haskel
            Reporter:
            Sean Busbey
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development