Fix minor bugs

This commit is contained in:
Timothyxxx
2024-01-15 13:52:13 +08:00
parent 1141232d80
commit c68796e842

View File

@@ -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: