summaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2023-01-02 22:00:29 +0000
committerGitHub <noreply@github.com>2023-01-03 09:00:29 +1100
commit3a5a4c708f4817919d9fe7396ceb2b8e57d2e68e (patch)
tree597cc9fb67dfd7f8eec088af0cd8a1e1e10c8a32 /lib/python/qmk/cli
parent0f5500182ca00907045bcb1cd870616b5a3bee11 (diff)
Report submodule status when not valid work-tree (#19474)
Diffstat (limited to 'lib/python/qmk/cli')
-rw-r--r--lib/python/qmk/cli/doctor/check.py2
-rwxr-xr-xlib/python/qmk/cli/doctor/main.py2
2 files changed, 1 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/doctor/check.py b/lib/python/qmk/cli/doctor/check.py
index 8a0422ba72..a368242fdb 100644
--- a/lib/python/qmk/cli/doctor/check.py
+++ b/lib/python/qmk/cli/doctor/check.py
@@ -119,10 +119,8 @@ def check_submodules():
"""
for submodule in submodules.status().values():
if submodule['status'] is None:
- cli.log.error('Submodule %s has not yet been cloned!', submodule['name'])
return CheckStatus.ERROR
elif not submodule['status']:
- cli.log.warning('Submodule %s is not up to date!', submodule['name'])
return CheckStatus.WARNING
return CheckStatus.OK
diff --git a/lib/python/qmk/cli/doctor/main.py b/lib/python/qmk/cli/doctor/main.py
index 1600ab8dd4..d55a11e5fd 100755
--- a/lib/python/qmk/cli/doctor/main.py
+++ b/lib/python/qmk/cli/doctor/main.py
@@ -142,7 +142,7 @@ def doctor(cli):
if sub_ok == CheckStatus.OK:
cli.log.info('Submodules are up to date.')
else:
- if yesno('Would you like to clone the submodules?', default=True):
+ if git_check_repo() and yesno('Would you like to clone the submodules?', default=True):
submodules.update()
sub_ok = check_submodules()