prevent check_git_status() in docker images (#1951)
Browse files* prevent check_git_status() running docker images
* Update general.py
- utils/general.py +1 -1
utils/general.py
CHANGED
@@ -60,7 +60,7 @@ def check_git_status():
|
|
60 |
# Recommend 'git pull' if code is out of date
|
61 |
print(colorstr('github: '), end='')
|
62 |
try:
|
63 |
-
if Path('.git').exists() and check_online():
|
64 |
url = subprocess.check_output(
|
65 |
'git fetch && git config --get remote.origin.url', shell=True).decode('utf-8')[:-1]
|
66 |
n = int(subprocess.check_output(
|
|
|
60 |
# Recommend 'git pull' if code is out of date
|
61 |
print(colorstr('github: '), end='')
|
62 |
try:
|
63 |
+
if Path('.git').exists() and not Path('/.dockerenv').exists() and check_online():
|
64 |
url = subprocess.check_output(
|
65 |
'git fetch && git config --get remote.origin.url', shell=True).decode('utf-8')[:-1]
|
66 |
n = int(subprocess.check_output(
|