Skip to content

Commit

Permalink
prevent check_git_status() in docker images (ultralytics#1951)
Browse files Browse the repository at this point in the history
* prevent check_git_status() running docker images

* Update general.py
  • Loading branch information
glenn-jocher committed Jan 16, 2021
1 parent 5d4ab50 commit 2034f5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def check_git_status():
# Recommend 'git pull' if code is out of date
print(colorstr('github: '), end='')
try:
if Path('.git').exists() and check_online():
if Path('.git').exists() and not Path('/.dockerenv').exists() and check_online():
url = subprocess.check_output(
'git fetch && git config --get remote.origin.url', shell=True).decode('utf-8')[:-1]
n = int(subprocess.check_output(
Expand Down

0 comments on commit 2034f5c

Please sign in to comment.