diff --git a/libs/executors/tests/end-to-end/test_cli.py b/libs/executors/tests/end-to-end/test_cli.py index 1471832e..b26db78d 100644 --- a/libs/executors/tests/end-to-end/test_cli.py +++ b/libs/executors/tests/end-to-end/test_cli.py @@ -16,6 +16,7 @@ import json import pathlib +import shlex import subprocess import sys @@ -99,8 +100,7 @@ def test_fake_source_from_console(self, command): '--loglevel ERROR' ) result = subprocess.run( - command, - shell=True, + shlex.split(command), check=False, capture_output=True, text=True, @@ -123,8 +123,7 @@ def test_fake_source_from_file(self, tmp_path, command): '--loglevel ERROR' ) result = subprocess.run( - command, - shell=True, + shlex.split(command), check=False, capture_output=True, text=True, @@ -146,8 +145,7 @@ def test_fake_source_from_config(self, tmp_path, command): '--loglevel ERROR' ) result = subprocess.run( - command, - shell=True, + shlex.split(command), check=False, capture_output=True, text=True, @@ -162,8 +160,7 @@ def test_fake_source_from_workflow(self, command): workflow_path = _SCRIPT_PATH / 'test_workflow.yaml' command = f'{command} {str(workflow_path)} --loglevel ERROR' result = subprocess.run( - command, - shell=True, + shlex.split(command), check=False, capture_output=True, text=True, @@ -183,8 +180,7 @@ def test_fake_source_from_workflow_with_config(self, command, tmp_path): f'{command} {str(workflow_path)} --loglevel ERROR -c {str(tmp_config)}' ) result = subprocess.run( - command, - shell=True, + shlex.split(command), check=False, capture_output=True, text=True,