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 @@ -5,6 +5,7 @@
# See the LICENSE file for more information.
#
import argparse
import shlex
import subprocess
import sys
import os
Expand All @@ -15,7 +16,7 @@ def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
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), shell=False, 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 @@ -7,6 +7,7 @@

import argparse
import platform
import shlex
import subprocess
import sys

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), shell=False, check=True)
return result.returncode


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#
import argparse
import platform
import shlex
import subprocess
import sys
import os as os_module
Expand Down Expand Up @@ -53,7 +54,7 @@ def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
if env is None:
env = os_module.environ.copy()
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, check=True, env=env)
result = subprocess.run(shlex.split(cmd), shell=False, check=True, env=env)
return result.returncode


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# See the LICENSE file for more information.
#
import argparse
import shlex
import subprocess
import sys
import os
Expand All @@ -15,7 +16,7 @@ def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
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), shell=False, check=True, env=env)
return result.returncode


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# See the LICENSE file for more information.
#
import argparse
import shlex
import subprocess
import sys
import os
Expand All @@ -15,7 +16,7 @@ def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
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), shell=False, check=True, env=env)
return result.returncode


Expand Down
Loading