Skip to content

Commit

Permalink
refactor: improve error message with yaml (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
pythoninja committed Dec 15, 2023
1 parent 08e0798 commit 5e530c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sshgen/utils/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get_hosts_path(file_path: str) -> Path:
CommonUtils.check_and_exit(resolved_path.exists(),
f'Ansible hosts file does not exists at {resolved_path}. Exiting...')
CommonUtils.check_and_exit(FileUtils.is_yaml_file(resolved_path),
'Ansible hosts file is not a yaml file. Valid extensions are: yaml or yml.'
'Ansible hosts file is not a yaml file. Valid extensions are: yaml or yml. '
'Exiting...')
CommonUtils.check_and_exit(not FileUtils.is_empty(resolved_path),
f'Ansible hosts file {resolved_path} is empty. Exiting...')
Expand Down

0 comments on commit 5e530c0

Please sign in to comment.