Commit 9c296a6b authored by Samuel GAIST's avatar Samuel GAIST

[commands] Add validation before checking anything else

parent e68f68d1
......@@ -282,6 +282,12 @@ def push_impl(ctx, names, force, dry_run):
mappings = ctx.meta.get("mappings", {})
for name in names:
validator = common.TYPE_VALIDATOR[asset_info.asset_type](config.path, name)
if not validator.valid:
raise RuntimeError(
"Invalid {} {}".format(asset_info.asset_type, validator.errors)
)
with common.Selector(config.path) as selector:
dependency_type = common.TYPE_PLURAL[asset_info.asset_type]
fork = selector.forked_from(asset_info.asset_type, name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment