Commit
·
1531795
1
Parent(s):
1e9cf6a
avoid git status check in Docker bug fix #342
Browse files- utils/utils.py +1 -1
utils/utils.py
CHANGED
@@ -45,7 +45,7 @@ def get_latest_run(search_dir='./runs'):
|
|
45 |
|
46 |
def check_git_status():
|
47 |
# Suggest 'git pull' if repo is out of date
|
48 |
-
if platform in ['linux', 'darwin']:
|
49 |
s = subprocess.check_output('if [ -d .git ]; then git fetch && git status -uno; fi', shell=True).decode('utf-8')
|
50 |
if 'Your branch is behind' in s:
|
51 |
print(s[s.find('Your branch is behind'):s.find('\n\n')] + '\n')
|
|
|
45 |
|
46 |
def check_git_status():
|
47 |
# Suggest 'git pull' if repo is out of date
|
48 |
+
if platform in ['linux', 'darwin'] and not os.path.isfile('/.dockerenv'):
|
49 |
s = subprocess.check_output('if [ -d .git ]; then git fetch && git status -uno; fi', shell=True).decode('utf-8')
|
50 |
if 'Your branch is behind' in s:
|
51 |
print(s[s.find('Your branch is behind'):s.find('\n\n')] + '\n')
|