ai-observability / check_git.py
Vishnu-VJ24
Deploy Final - Flawless SDK
f747401
raw
history blame contribute delete
476 Bytes
import subprocess
def run_git_cmd(cmd):
try:
result = subprocess.run(
cmd,
capture_output=True,
text=True,
check=True)
print(f"--- Output of {' '.join(cmd)} ---")
print(result.stdout)
except subprocess.CalledProcessError as e:
print(f"Error running {' '.join(cmd)}: {e.stderr}")
if __name__ == "__main__":
run_git_cmd(["git", "status"])
run_git_cmd(["git", "log", "-n", "3"])