diff --git a/bin/actions/service.py b/bin/actions/service.py index 06856b7..4a44825 100755 --- a/bin/actions/service.py +++ b/bin/actions/service.py @@ -273,11 +273,15 @@ def main(): # Stop command stop_parser = subparsers.add_parser("stop", help="Stop a Docker service") - stop_parser_group = stop_parser.add_mutually_exclusive_group(required=True) + stop_parser_group = stop_parser.add_mutually_exclusive_group(required=False) stop_parser_group.add_argument( "--all", action="store_true", help="Stop all running services" ) - stop_parser_group.add_argument("service", nargs="?", help="Service to stop") + stop_parser_group.add_argument("service", help="Service to stop") + + # Make one of the arguments required + stop_parser.set_defaults(service=None) + stop_parser_group.required = True # Restart command restart_parser = subparsers.add_parser("restart", help="Restart a Docker service")