diff --git a/desktop_env/server/main.py b/desktop_env/server/main.py index b102133..f1f11b7 100644 --- a/desktop_env/server/main.py +++ b/desktop_env/server/main.py @@ -41,7 +41,7 @@ def execute_command(): shell = data.get('shell', False) command = data.get('command', "" if shell else []) - if isinstance(command, str): + if isinstance(command, str) and not shell: command = shlex.split(command) # Execute the command without any safety checks. @@ -66,7 +66,7 @@ def launch_app(): shell = data.get("shell", False) command: List[str] = data.get("command", "" if shell else []) - if isinstance(command, str): + if isinstance(command, str) and not shell: command = shlex.split(command) try: