diff --git a/qmk_cli/script_qmk.py b/qmk_cli/script_qmk.py index 8d1f1b3..d7cf476 100644 --- a/qmk_cli/script_qmk.py +++ b/qmk_cli/script_qmk.py @@ -52,7 +52,19 @@ def main(): if 'windows' in platform().lower(): msystem = os.environ.get('MSYSTEM', '') - if 'mingw64' not in sys.executable or 'MINGW64' not in msystem: + # Assume the environment isn't workable by default + env_ok = False + + # Check if we're using the mingw64/msys2 environment + if 'mingw64' in sys.executable and 'MINGW64' in msystem: + env_ok = True + + # Check if we're using a `uv`-based environment + if '\\uv\\' in sys.executable or '/uv/' in sys.executable: + env_ok = True + + # If none of the options above were true, then we're in an unsupported environment. Bomb out. + if not env_ok: print('ERROR: It seems you are not using the MINGW64 terminal.') print('Please close this terminal and open a new MSYS2 MinGW 64-bit terminal.') print('Python: %s, MSYSTEM: %s' % (sys.executable, msystem))