mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-23 17:04:21 +01:00
Pass command line args as list (#1486)
Co-authored-by: Nicholas Tindle <nick@ntindle.com> Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com> Co-authored-by: Richard Beales <rich@richbeales.net>
This commit is contained in:
@@ -33,7 +33,7 @@ def execute_python_file(filename: str) -> str:
|
||||
|
||||
if we_are_running_in_a_docker_container():
|
||||
result = subprocess.run(
|
||||
f"python {filename}", capture_output=True, encoding="utf8", shell=True
|
||||
["python", filename], capture_output=True, encoding="utf8"
|
||||
)
|
||||
if result.returncode == 0:
|
||||
return result.stdout
|
||||
@@ -65,7 +65,7 @@ def execute_python_file(filename: str) -> str:
|
||||
logger.info(status)
|
||||
container = client.containers.run(
|
||||
image_name,
|
||||
f"python {Path(filename).relative_to(CFG.workspace_path)}",
|
||||
["python", str(Path(filename).relative_to(CFG.workspace_path))],
|
||||
volumes={
|
||||
CFG.workspace_path: {
|
||||
"bind": "/workspace",
|
||||
|
||||
Reference in New Issue
Block a user