Browse Source

check_git_status() when not exist /workspace (#1966)

5.0
Glenn Jocher GitHub 3 years ago
parent
commit
b26a2f6242
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      utils/general.py

+ 1
- 1
utils/general.py View File

# Recommend 'git pull' if code is out of date # Recommend 'git pull' if code is out of date
print(colorstr('github: '), end='') print(colorstr('github: '), end='')
try: try:
if Path('.git').exists() and not Path('/.dockerenv').exists() and check_online():
if Path('.git').exists() and not Path('/workspace').exists() and check_online(): # not exist '/.dockerenv'
url = subprocess.check_output( url = subprocess.check_output(
'git fetch && git config --get remote.origin.url', shell=True).decode('utf-8')[:-1] 'git fetch && git config --get remote.origin.url', shell=True).decode('utf-8')[:-1]
n = int(subprocess.check_output( n = int(subprocess.check_output(

Loading…
Cancel
Save