Răsfoiți Sursa

Qmk doctor os check to support newer msys2/w10 installations (#8031)

* Fixed OS detection on newer MSYS installations

* made OS sting lower case
Mikkel Jeppesen 5 ani în urmă
părinte
comite
197a401be6
1 a modificat fișierele cu 4 adăugiri și 4 ștergeri
  1. 4 4
      lib/python/qmk/cli/doctor.py

+ 4 - 4
lib/python/qmk/cli/doctor.py

@@ -168,15 +168,15 @@ def doctor(cli):
     ok = True
     ok = True
 
 
     # Determine our OS and run platform specific tests
     # Determine our OS and run platform specific tests
-    OS = platform.system()  # noqa (N806), uppercase name is ok in this instance
+    OS = platform.platform().lower()  # noqa (N806), uppercase name is ok in this instance
 
 
-    if OS == 'Darwin':
+    if 'darwin' in OS:
         if not os_test_macos():
         if not os_test_macos():
             ok = False
             ok = False
-    elif OS == 'Linux':
+    elif 'linux' in OS:
         if not os_test_linux():
         if not os_test_linux():
             ok = False
             ok = False
-    elif OS == 'Windows':
+    elif 'windows' in OS:
         if not os_test_windows():
         if not os_test_windows():
             ok = False
             ok = False
     else:
     else: