#!/usr/bin/env python3 """Helper script to push git changes.""" import subprocess import sys import os env = os.environ.copy() env["http_proxy"] = "http://127.0.0.1:1080" env["https_proxy"] = "http://127.0.0.1:1080" result = subprocess.run( ["git", "push", "origin", "main"], cwd="hf_webdav/space-git", env=env, capture_output=True, text=True, timeout=120 ) print(result.stdout) if result.stderr: print(result.stderr, file=sys.stderr) sys.exit(result.returncode)