summaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorErovia <Erovia@users.noreply.github.com>2022-03-10 21:33:41 +0000
committerGitHub <noreply@github.com>2022-03-10 21:33:41 +0000
commitb75f6691a15a78b9c200a88e28792974ca2f9461 (patch)
treebf336f07dfef692edb6d8fea1d2f14b30a28d6b8 /lib/python
parent6c40b6856bb843e39bf0992164f41e29ce7ea72c (diff)
CLI: Fix 'cd' subcommand on Windows (#16610)
The 'cd' subcommand was failing as the current shell's Windows path was mangled while milc processed it. Using 'subprocess' directly avoids this issue and an extra layer of subshell.
Diffstat (limited to 'lib/python')
-rwxr-xr-xlib/python/qmk/cli/cd.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/cd.py b/lib/python/qmk/cli/cd.py
index c62c3f56c6..ef03011f1f 100755
--- a/lib/python/qmk/cli/cd.py
+++ b/lib/python/qmk/cli/cd.py
@@ -2,6 +2,7 @@
"""
import sys
import os
+import subprocess
from milc import cli
@@ -41,6 +42,6 @@ def cd(cli):
# Set the prompt for the new shell
qmk_env['MSYS2_PS1'] = qmk_env['PS1']
# Start the new subshell
- cli.run([os.environ.get('SHELL', '/usr/bin/bash')], env=qmk_env)
+ subprocess.run([os.environ.get('SHELL', '/usr/bin/bash')], env=qmk_env)
else:
cli.log.info("Already within qmk_firmware directory.")