Skip to content

Commit

Permalink
Return error message when no fmf root found
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismail Ibrahim Quwarah committed Sep 24, 2024
1 parent 1238dca commit c302010
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tmt/steps/prepare/ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,16 @@ def go(

logger.info('playbook-path', playbook_path, 'green')

# Check if fmf root exists
try:
playbook_root = self.step.plan.fmf_root
except TypeError:
raise PrepareError(
"No fmf root found. Directory is not initialized with `tmt init`")

guest.ansible(
playbook_path,
playbook_root=self.step.plan.fmf_root,
playbook_root=playbook_root,
extra_args=self.data.extra_args)

return results
Expand Down

0 comments on commit c302010

Please sign in to comment.