summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2020-12-19 00:43:05 +0000
committerQMK Bot <hello@qmk.fm>2020-12-19 00:43:05 +0000
commit35e684d1fffd9b6cecb80884ed1f3b08a50ef192 (patch)
treed05e949536350f73591db39773d2a9c749c6a6d5
parent45a1a3239d77b0ff48f41f47c28e8ef423003966 (diff)
parentbded5f473c887fb36a2ca9d473635c1b84d0a04b (diff)
downloadqmk_firmware-35e684d1fffd9b6cecb80884ed1f3b08a50ef192.tar.gz
qmk_firmware-35e684d1fffd9b6cecb80884ed1f3b08a50ef192.zip
Merge remote-tracking branch 'origin/master' into develop
-rwxr-xr-xlib/python/qmk/cli/doctor.py30
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py
index 4fe318b636..25e2e239cb 100755
--- a/lib/python/qmk/cli/doctor.py
+++ b/lib/python/qmk/cli/doctor.py
@@ -281,6 +281,22 @@ def is_executable(command):
return False
+def os_tests():
+ """Determine our OS and run platform specific tests
+ """
+ platform_id = platform.platform().lower()
+
+ if 'darwin' in platform_id or 'macos' in platform_id:
+ return os_test_macos()
+ elif 'linux' in platform_id:
+ return os_test_linux()
+ elif 'windows' in platform_id:
+ return os_test_windows()
+ else:
+ cli.log.warning('Unsupported OS detected: %s', platform_id)
+ return CheckStatus.WARNING
+
+
def os_test_linux():
"""Run the Linux specific tests.
"""
@@ -317,20 +333,8 @@ def doctor(cli):
* [ ] Compile a trivial program with each compiler
"""
cli.log.info('QMK Doctor is checking your environment.')
- status = CheckStatus.OK
-
- # Determine our OS and run platform specific tests
- platform_id = platform.platform().lower()
- if 'darwin' in platform_id or 'macos' in platform_id:
- status = os_test_macos()
- elif 'linux' in platform_id:
- status = os_test_linux()
- elif 'windows' in platform_id:
- status = os_test_windows()
- else:
- cli.log.warning('Unsupported OS detected: %s', platform_id)
- status = CheckStatus.WARNING
+ status = os_tests()
cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE)