From d676bdcdc9f75af01d660fb2c919d5e5c2fbad40 Mon Sep 17 00:00:00 2001 From: Malcolm Date: Fri, 17 May 2024 11:00:30 -0400 Subject: [PATCH] PRO-387 FIX Support empty config files --- terrat_runner/repo_config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/terrat_runner/repo_config.py b/terrat_runner/repo_config.py index c2c06688..ad8f6207 100644 --- a/terrat_runner/repo_config.py +++ b/terrat_runner/repo_config.py @@ -15,7 +15,11 @@ def load(paths): for path in paths: if os.path.exists(path): with open(path, 'r') as f: - return yaml.safe_load(f.read()) + content = f.read() + if content.strip(): + return yaml.safe_load(content) + else: + return {} return {}