Skip to content

Commit cacd0fa

Browse files
authored
Merge pull request #203 from qmk/windows-uv-compat
2 parents ffe20fb + d9f9b5a commit cacd0fa

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

qmk_cli/script_qmk.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,19 @@ def main():
5252
if 'windows' in platform().lower():
5353
msystem = os.environ.get('MSYSTEM', '')
5454

55-
if 'mingw64' not in sys.executable or 'MINGW64' not in msystem:
55+
# Assume the environment isn't workable by default
56+
env_ok = False
57+
58+
# Check if we're using the mingw64/msys2 environment
59+
if 'mingw64' in sys.executable and 'MINGW64' in msystem:
60+
env_ok = True
61+
62+
# Check if we're using a `uv`-based environment
63+
if '\\uv\\' in sys.executable or '/uv/' in sys.executable:
64+
env_ok = True
65+
66+
# If none of the options above were true, then we're in an unsupported environment. Bomb out.
67+
if not env_ok:
5668
print('ERROR: It seems you are not using the MINGW64 terminal.')
5769
print('Please close this terminal and open a new MSYS2 MinGW 64-bit terminal.')
5870
print('Python: %s, MSYSTEM: %s' % (sys.executable, msystem))

0 commit comments

Comments
 (0)