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, 1.6.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

        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>
        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>
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development