From 1d3ae7d37838be13b7c5dc28f0657577eeaff759 Mon Sep 17 00:00:00 2001 From: mia Date: Tue, 30 Jul 2024 12:54:29 -0700 Subject: git pull before edit --- zoner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zoner.py b/zoner.py index 0056396..f4d4b1c 100644 --- a/zoner.py +++ b/zoner.py @@ -198,6 +198,8 @@ def git_update(domain: str): def main(): + if (cfg_dir / ".git").exists(): + subprocess.check_call(["git", "pull"], cwd=cfg_dir, stdout=subprocess.PIPE) if len(sys.argv) == 1: # selector names = map(lambda path: path.name[:-5], cfg_dir.glob("*.zone")) ret = subprocess.run( -- cgit 1.4.1