Fix update.py

Omit success check for the revert, as it resulted in failures for files that didn't exist.
This commit is contained in:
Marc Wrobel
2024-02-19 21:33:55 +01:00
parent de3bef8dce
commit 0ec53675bf

View File

@@ -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}")