fix arguments with spaces

This commit is contained in:
Sergey Shchelkanov 2023-08-31 12:27:59 +03:00
parent 51cd0c845a
commit ca3d977611

View File

@ -226,11 +226,8 @@ def run_openocd(
openocd_target=openocd_target_path, openocd_target=openocd_target_path,
is_open_console=False is_open_console=False
) -> subprocess.Popen: ) -> subprocess.Popen:
print(openocd_scripts) cmd = [openocd_exec, "-s", openocd_scripts,
cmd = shlex.split( "-f", openocd_interface, "-f", openocd_target]
f"{openocd_exec} -s {openocd_scripts} "
f"-f {openocd_interface} -f {openocd_target}", posix=False
)
creation_flags = subprocess.SW_HIDE creation_flags = subprocess.SW_HIDE
if is_open_console: if is_open_console: