File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
from typing import Optional
2
+ from types import ModuleType
2
3
from pathlib import Path
3
4
import shutil
4
- import git
5
5
from agentstack import conf , log
6
6
from agentstack .exceptions import EnvironmentError
7
7
8
-
9
8
MAIN_BRANCH_NAME = "main"
10
9
11
10
AUTOMATION_NOTE = "\n \n (This commit was made automatically by AgentStack)"
15
14
_USE_GIT = None # global state to disable git for this run
16
15
17
16
17
+ # The python git module prints an excessive error message when git is not
18
+ # installed. We always want to allow git support to fail silently.
19
+ try :
20
+ import git
21
+ except ImportError :
22
+ _USE_GIT = False
23
+
24
+
18
25
def should_track_changes () -> bool :
19
26
"""
20
27
If git has been disabled for this run, return False. Next, look for the value
You can’t perform that action at this time.
0 commit comments