exit 1 and report extra args on CLI

This commit is contained in:
Martin A. Brown 2016-02-26 23:18:02 -08:00
parent 9137946a05
commit ee68a453d2
1 changed files with 7 additions and 0 deletions

View File

@ -69,6 +69,7 @@ def status(config, args):
def build(config, args):
targets = list()
stems = list()
args = set(args)
if args:
for arg in args:
if os.path.isfile(arg) or os.path.isdir(arg):
@ -86,6 +87,12 @@ def build(config, args):
if len(targets) != len(args):
targets = [x.stem for x in targets]
missing = args.difference(set(targets))
logger.error("Could not find matching file or stem for args: %s",
', '.join(missing))
return 1
for source in targets:
if source.stem in config.skip:
logger.info("%s skipping build per request", source.stem)