From 1531795f5e9a07dff0d6c143c26fee4e0ebfe20d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 10 Jul 2020 00:11:50 -0700 Subject: [PATCH] avoid git status check in Docker bug fix #342 --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index 58f635e..53298a4 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -45,7 +45,7 @@ def get_latest_run(search_dir='./runs'): def check_git_status(): # Suggest 'git pull' if repo is out of date - if platform in ['linux', 'darwin']: + if platform in ['linux', 'darwin'] and not os.path.isfile('/.dockerenv'): s = subprocess.check_output('if [ -d .git ]; then git fetch && git status -uno; fi', shell=True).decode('utf-8') if 'Your branch is behind' in s: print(s[s.find('Your branch is behind'):s.find('\n\n')] + '\n')