mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-22 04:00:40 +00:00
Print usage when argv empty
This commit is contained in:
parent
49e1bdfe3d
commit
fab8c8ba1c
@ -95,6 +95,10 @@ def get_opts(args=None):
|
||||
)
|
||||
opts = parser.parse_args(args=args)
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
parser.print_help()
|
||||
exit(0)
|
||||
|
||||
if not opts.prefix:
|
||||
parser.error("Running with no --prefix will match nothing.")
|
||||
|
||||
|
@ -269,6 +269,10 @@ def get_args(args=None):
|
||||
help="Path to a file which contains a list of images to exclude, one "
|
||||
"image tag per line.")
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
parser.print_help()
|
||||
exit(0)
|
||||
|
||||
return parser.parse_args(args=args)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user