From e48d950831e216a1ce89a7fe59054f6726b0876b Mon Sep 17 00:00:00 2001 From: key-moon Date: Sun, 2 Jun 2024 18:41:19 +0900 Subject: [PATCH] fix checking update --- crawler/runner/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawler/runner/main.py b/crawler/runner/main.py index fd67b9a..35ba34a 100644 --- a/crawler/runner/main.py +++ b/crawler/runner/main.py @@ -35,7 +35,7 @@ def pull(): run(["git", "-C", repository_path, "pull"], check=True) def commit_and_push(with_rebase=True, overwrite=False): - if run(["git", "-C", repository_path, "diff", "--quiet"], capture_output=True).returncode != 0: + if len(get_dirty_files()): print("[+] commiting changes and syncing...") run(["git", "-C", repository_path, "add", "."], check=True) run(["git", "-C", repository_path, "commit", "-m", f"[auto] refresh caches"], check=True)