浏览代码

check weather to use posix or not, fixes #1767

Rodja Trappe 1 年之前
父节点
当前提交
6dbed80249
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/script_executor/main.py

+ 1 - 1
examples/script_executor/main.py

@@ -14,7 +14,7 @@ async def run_command(command: str) -> None:
     result.content = ''
     command = command.replace('python3', sys.executable)  # NOTE replace with machine-independent Python path (#1240)
     process = await asyncio.create_subprocess_exec(
-        *shlex.split(command),
+        *shlex.split(command, posix="win" not in sys.platform.lower()),
         stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.STDOUT,
         cwd=os.path.dirname(os.path.abspath(__file__))
     )