check_git_status() when not exist /workspace (#1966)
Browse files- 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 not Path('
|
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('/workspace').exists() and check_online(): # not exist '/.dockerenv'
|
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(
|