Skip to content

Commit 0b4fe09

Browse files
fix(delete-preview): improve error message for missing .gitops.config.yaml
1 parent 4046d84 commit 0b4fe09

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

gitopscli/commands/delete_preview.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ def delete_preview_command(
4343

4444
apps_git.checkout("master")
4545
logging.info("App repo branch master checkout successful")
46-
gitops_config = GitOpsConfig(apps_git.get_full_file_path(".gitops.config.yaml"))
46+
try:
47+
gitops_config = GitOpsConfig(apps_git.get_full_file_path(".gitops.config.yaml"))
48+
except FileNotFoundError as ex:
49+
raise GitOpsException(f"Couldn't find .gitops.config.yaml") from ex
4750
logging.info("Read GitOpsConfig: %s", gitops_config)
4851

4952
root_git = create_git(

0 commit comments

Comments
 (0)