Skip to content

Commit

Permalink
assign exit code 2 for arg errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidzr committed Feb 22, 2023
1 parent b0be62d commit b2dbc3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions harness/determined/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ def die(message: str, always_print_traceback: bool = False, exit_code: int = 1)
except FeatureFlagDisabled as e:
die(f"Master does not support this operation: {e}")
except CliError as e:
die(f"{e.name}: {e.message}", exit_code=e.exit_code)
die(e.message, exit_code=e.exit_code)
except ArgumentError as e:
die(f"Argument Error: {e.message}")
die(e.message, exit_code=2)
except Exception:
die("Failed to {}".format(parsed_args.func.__name__), always_print_traceback=True)
except KeyboardInterrupt:
Expand Down

0 comments on commit b2dbc3f

Please sign in to comment.