diff options
| author | Ryan <fauxpark@gmail.com> | 2021-04-02 21:44:27 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-02 21:44:27 +1100 |
| commit | 12f308748f3dd7ab2a1f3d93f8f207cb51e306a4 (patch) | |
| tree | 4c7c3a08d307cbff21f3b3340ea676a88d99d9f3 /lib | |
| parent | ac0ba832c73dd2130f66ba1f3781ccb16c150a89 (diff) | |
| download | qmk_firmware-12f308748f3dd7ab2a1f3d93f8f207cb51e306a4.tar.gz qmk_firmware-12f308748f3dd7ab2a1f3d93f8f207cb51e306a4.zip | |
qmk doctor: Display macOS and Windows versions, and add WSL warning for /mnt (#12441)
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/python/qmk/cli/doctor.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 9210737f1..45a53c7d4 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py | |||
| @@ -35,6 +35,11 @@ def os_test_linux(): | |||
| 35 | if 'microsoft' in platform.uname().release.lower(): | 35 | if 'microsoft' in platform.uname().release.lower(): |
| 36 | cli.log.info("Detected {fg_cyan}Linux (WSL){fg_reset}.") | 36 | cli.log.info("Detected {fg_cyan}Linux (WSL){fg_reset}.") |
| 37 | 37 | ||
| 38 | # https://github.com/microsoft/WSL/issues/4197 | ||
| 39 | if QMK_FIRMWARE.startswith("/mnt"): | ||
| 40 | cli.log.warning("I/O performance on /mnt may be extremely slow.") | ||
| 41 | return CheckStatus.WARNING | ||
| 42 | |||
| 38 | return CheckStatus.OK | 43 | return CheckStatus.OK |
| 39 | else: | 44 | else: |
| 40 | cli.log.info("Detected {fg_cyan}Linux{fg_reset}.") | 45 | cli.log.info("Detected {fg_cyan}Linux{fg_reset}.") |
| @@ -46,7 +51,7 @@ def os_test_linux(): | |||
| 46 | def os_test_macos(): | 51 | def os_test_macos(): |
| 47 | """Run the Mac specific tests. | 52 | """Run the Mac specific tests. |
| 48 | """ | 53 | """ |
| 49 | cli.log.info("Detected {fg_cyan}macOS{fg_reset}.") | 54 | cli.log.info("Detected {fg_cyan}macOS %s{fg_reset}.", platform.mac_ver()[0]) |
| 50 | 55 | ||
| 51 | return CheckStatus.OK | 56 | return CheckStatus.OK |
| 52 | 57 | ||
| @@ -54,7 +59,8 @@ def os_test_macos(): | |||
| 54 | def os_test_windows(): | 59 | def os_test_windows(): |
| 55 | """Run the Windows specific tests. | 60 | """Run the Windows specific tests. |
| 56 | """ | 61 | """ |
| 57 | cli.log.info("Detected {fg_cyan}Windows{fg_reset}.") | 62 | win32_ver = platform.win32_ver() |
| 63 | cli.log.info("Detected {fg_cyan}Windows %s (%s){fg_reset}.", win32_ver[0], win32_ver[1]) | ||
| 58 | 64 | ||
| 59 | return CheckStatus.OK | 65 | return CheckStatus.OK |
| 60 | 66 | ||
| @@ -71,11 +77,10 @@ def doctor(cli): | |||
| 71 | * [ ] Compile a trivial program with each compiler | 77 | * [ ] Compile a trivial program with each compiler |
| 72 | """ | 78 | """ |
| 73 | cli.log.info('QMK Doctor is checking your environment.') | 79 | cli.log.info('QMK Doctor is checking your environment.') |
| 80 | cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) | ||
| 74 | 81 | ||
| 75 | status = os_tests() | 82 | status = os_tests() |
| 76 | 83 | ||
| 77 | cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) | ||
| 78 | |||
| 79 | # Make sure our QMK home is a Git repo | 84 | # Make sure our QMK home is a Git repo |
| 80 | git_ok = check_git_repo() | 85 | git_ok = check_git_repo() |
| 81 | 86 | ||
