From 739b56ddf7c66b2576a9f0c5c758cd83b9cb2b99 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 16 Jan 2021 01:00:07 -0800 Subject: [PATCH 1/2] prevent check_git_status() running docker images --- utils/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/general.py b/utils/general.py index 3247b66da0ce..d0f7fc90acd6 100755 --- a/utils/general.py +++ b/utils/general.py @@ -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 check_online() and not Path('/.dockerenv').exists(): url = subprocess.check_output( 'git fetch && git config --get remote.origin.url', shell=True).decode('utf-8')[:-1] n = int(subprocess.check_output( From f03dceb972be0ca4a190f22fd5fa34cef4bf7f6e Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 16 Jan 2021 01:00:58 -0800 Subject: [PATCH 2/2] Update general.py --- utils/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/general.py b/utils/general.py index d0f7fc90acd6..92cf683c9d48 100755 --- a/utils/general.py +++ b/utils/general.py @@ -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() and not Path('/.dockerenv').exists(): + 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(