arguments fix
This commit is contained in:
+12
-1
@@ -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 "{}")
|
||||
|
||||
Reference in New Issue
Block a user