From 2fa0e84ac66be10cd3f0c43fa67e5b086d7cd799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Uhl=C3=AD=C5=99?= Date: Tue, 23 Jun 2026 04:54:15 +0000 Subject: [PATCH] arguments fix --- app/main.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index a32cd90..4acc9d1 100644 --- a/app/main.py +++ b/app/main.py @@ -404,7 +404,18 @@ def command_for_job(job: dict): if script_path is None: raise ValueError(f"Script not found: {script_name}") - return [str(script_path)] + script_args = payload.get("args") or [] + + if script_name == "delete-app.sh" and not script_args: + script_args = [target_id] + + if isinstance(script_args, str): + script_args = [script_args] + + if not isinstance(script_args, list): + script_args = [] + + return [str(script_path), *[str(arg) for arg in script_args]] if job_type == "run_alert_script": payload = json.loads(job.get("payload_json") or "{}")