Selaa lähdekoodia

check weather to use posix or not, fixes #1767

Rodja Trappe 1 vuosi sitten
vanhempi
säilyke
6dbed80249
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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 = ''
     result.content = ''
     command = command.replace('python3', sys.executable)  # NOTE replace with machine-independent Python path (#1240)
     command = command.replace('python3', sys.executable)  # NOTE replace with machine-independent Python path (#1240)
     process = await asyncio.create_subprocess_exec(
     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,
         stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.STDOUT,
         cwd=os.path.dirname(os.path.abspath(__file__))
         cwd=os.path.dirname(os.path.abspath(__file__))
     )
     )