From 0ec53675bfe25cbed8be22e61f99fdda017e9317 Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Mon, 19 Feb 2024 21:33:55 +0100 Subject: [PATCH] Fix update.py Omit success check for the revert, as it resulted in failures for files that didn't exist. --- update.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update.py b/update.py index 8abf8f24..0318076e 100644 --- a/update.py +++ b/update.py @@ -76,7 +76,8 @@ def __delete_data(product: ProductFrontmatter) -> None: def __revert_data(product: ProductFrontmatter) -> None: release_data_path = DATA_DIR / f"{product.name}.json" - subprocess.run(f'git checkout HEAD -- {release_data_path}', timeout=10, check=True, shell=True) + # check=False because the command fails if the file did not exist before + subprocess.run(f'git checkout HEAD -- {release_data_path}', timeout=10, check=False, shell=True) logging.warning(f"reverted changes in {release_data_path}")