From 4d4892f58a161865a8f417518d6a2614c7ac3006 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 31 Mar 2025 14:18:39 +1100 Subject: [PATCH 1/2] Windows `uv` compat. --- qmk_cli/script_qmk.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qmk_cli/script_qmk.py b/qmk_cli/script_qmk.py index 8d1f1b3..c3415e4 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: + 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)) From d9f9b5a27d64922d56fff578b6de5d0492877b3c Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Fri, 11 Apr 2025 22:03:14 +1000 Subject: [PATCH 2/2] Path characters. --- qmk_cli/script_qmk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmk_cli/script_qmk.py b/qmk_cli/script_qmk.py index c3415e4..d7cf476 100644 --- a/qmk_cli/script_qmk.py +++ b/qmk_cli/script_qmk.py @@ -60,7 +60,7 @@ def main(): env_ok = True # Check if we're using a `uv`-based environment - if '\\uv\\' in sys.executable: + 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.