Merge remote-tracking branch 'origin/main'
# Conflicts: # desktop_env/controllers/setup.py
This commit is contained in:
@@ -63,14 +63,15 @@ def execute_command():
|
||||
@app.route('/setup/launch', methods=["POST"])
|
||||
def launch_app():
|
||||
data = request.json
|
||||
command: List[str] = data.get("command", [])
|
||||
shell = data.get("shell", False)
|
||||
command: List[str] = data.get("command", "" if shell else [])
|
||||
|
||||
if isinstance(command, str):
|
||||
command = shlex.split(command)
|
||||
|
||||
try:
|
||||
subprocess.Popen(command)
|
||||
return "{:} launched successfully".format(" ".join(command))
|
||||
subprocess.Popen(command, shell=shell)
|
||||
return "{:} launched successfully".format(command if shell else " ".join(command))
|
||||
except Exception as e:
|
||||
return jsonify({"status": "error", "message": str(e)}), 500
|
||||
|
||||
|
||||
@@ -5,3 +5,4 @@ git+https://github.com/moses-palmer/pynput.git@refs/pull/541/head # to make sure
|
||||
requests
|
||||
flask
|
||||
numpy
|
||||
lxml
|
||||
|
||||
Reference in New Issue
Block a user