Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
import subprocess
import sys
import os
import shlex


def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
"""Run a shell command."""
if env is None:
env = os.environ.copy()
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, check=True, env=env)
result = subprocess.run(shlex.split(cmd), check=True, env=env)
return result.returncode


Expand Down
3 changes: 2 additions & 1 deletion packages/core_apps/default_app_cpp/tools/run_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import platform
import subprocess
import sys
import shlex


BUILD_TYPE = "debug"
Expand Down Expand Up @@ -52,7 +53,7 @@ def detect_arch() -> str:
def run_cmd(cmd: str) -> int:
"""Run a shell command."""
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, check=True)
result = subprocess.run(shlex.split(cmd), check=True)
return result.returncode


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
import subprocess
import sys
import os
import shlex


def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
"""Run a shell command."""
if env is None:
env = os.environ.copy()
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, check=True, env=env)
result = subprocess.run(shlex.split(cmd), check=True, env=env)
return result.returncode


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
import subprocess
import sys
import os
import shlex


def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
"""Run a shell command."""
if env is None:
env = os.environ.copy()
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, check=True, env=env)
result = subprocess.run(shlex.split(cmd), check=True, env=env)
return result.returncode


Expand Down
Loading