Skip to content

Commit

Permalink
raise missing inherited target to error. Fix #20
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed Nov 7, 2023
1 parent 1260146 commit 0ebee6f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions markmeld/melder.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,10 @@ def resolve_target_inheritance(self, target_name):
_LOGGER.debug(error_msg)
return {}
if target_name not in list(root_cfg["targets"].keys()):
error_msg = f"Target {target_name} not found"
_LOGGER.debug(error_msg)
return {}
error_msg = f"Target inherits from target '{target_name}', which was not found. Did you forget an import?"
_LOGGER.error(error_msg)
raise TargetError(error_msg)
# return {}
# _LOGGER.debug(f"Root cft targets: {root_cfg['targets']}")

if "inherit_from" not in root_cfg["targets"][target_name]:
Expand Down

0 comments on commit 0ebee6f

Please sign in to comment.