From 1b641ffc1d2111f0610b1f5651158c2ebab94e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Fri, 22 Sep 2023 11:51:58 +0200 Subject: [PATCH] [fix] check_kind:generic_remote:command composition --- source/logic/check_kinds/generic_remote.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/logic/check_kinds/generic_remote.ts b/source/logic/check_kinds/generic_remote.ts index 43c4752..0f83948 100644 --- a/source/logic/check_kinds/generic_remote.ts +++ b/source/logic/check_kinds/generic_remote.ts @@ -170,19 +170,23 @@ namespace _heimdall.check_kinds.generic_remote outer_command_parts.push(lib_plankton.string.coin("{{host}}", {"host": parameters["host"]})); } if (parameters["ssh_port"] !== null) { - outer_command_parts.push(lib_plankton.string.coin("-p {{port}}", {"port": parameters["ssh_port"].toFixed(0)})); + outer_command_parts.push(lib_plankton.string.coin("-p", {})); + outer_command_parts.push(lib_plankton.string.coin("{{port}}", {"port": parameters["ssh_port"].toFixed(0)})); } if (parameters["ssh_user"] !== null) { - outer_command_parts.push(lib_plankton.string.coin("-l {{user}}", {"user": parameters["ssh_user"]})); + outer_command_parts.push(lib_plankton.string.coin("-l", {})); + outer_command_parts.push(lib_plankton.string.coin("{{user}}", {"user": parameters["ssh_user"]})); } if (parameters["ssh_key"] !== null) { - outer_command_parts.push(lib_plankton.string.coin("-i {{key}}", {"key": parameters["ssh_key"]})); + outer_command_parts.push(lib_plankton.string.coin("-i", {})); + outer_command_parts.push(lib_plankton.string.coin("{{key}}", {"key": parameters["ssh_key"]})); } if (true) { - outer_command_parts.push(lib_plankton.string.coin("-o BatchMode=yes", {})); + outer_command_parts.push(lib_plankton.string.coin("-o", {})); + outer_command_parts.push(lib_plankton.string.coin("BatchMode=yes", {})); } if (true) { - outer_command_parts.push(lib_plankton.string.coin("'{{inner_command}}'", {"inner_command": inner_command})); + outer_command_parts.push(lib_plankton.string.coin("{{inner_command}}", {"inner_command": inner_command})); } const outer_command : string = outer_command_parts.join(" ");