aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk/cli')
-rwxr-xr-xlib/python/qmk/cli/doctor.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py
index 25e2e239c..ea1113c64 100755
--- a/lib/python/qmk/cli/doctor.py
+++ b/lib/python/qmk/cli/doctor.py
@@ -154,6 +154,17 @@ def check_submodules():
154 return CheckStatus.OK 154 return CheckStatus.OK
155 155
156 156
157def check_git_repo():
158 """Checks that the .git directory exists inside QMK_HOME.
159
160 This is a decent enough indicator that the qmk_firmware directory is a
161 proper Git repository, rather than a .zip download from GitHub.
162 """
163 dot_git_dir = QMK_FIRMWARE / '.git'
164
165 return CheckStatus.OK if dot_git_dir.is_dir() else CheckStatus.WARNING
166
167
157def check_udev_rules(): 168def check_udev_rules():
158 """Make sure the udev rules look good. 169 """Make sure the udev rules look good.
159 """ 170 """
@@ -338,6 +349,13 @@ def doctor(cli):
338 349
339 cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) 350 cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE)
340 351
352 # Make sure our QMK home is a Git repo
353 git_ok = check_git_repo()
354
355 if git_ok == CheckStatus.WARNING:
356 cli.log.warning("QMK home does not appear to be a Git repository! (no .git folder)")
357 status = CheckStatus.WARNING
358
341 # Make sure the basic CLI tools we need are available and can be executed. 359 # Make sure the basic CLI tools we need are available and can be executed.
342 bin_ok = check_binaries() 360 bin_ok = check_binaries()
343 361