From c757064eb9537321b7cad69db6e05ddc9c576583 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 8 May 2025 10:05:39 +0200 Subject: [PATCH] =?UTF-8?q?mod/ssh-keys-import:=20:do=20...=20on-error=3D.?= =?UTF-8?q?..=20->=20...=20well...=20-=20fix=20condition=20=F0=9F=A5=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mod/ssh-keys-import.rsc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mod/ssh-keys-import.rsc b/mod/ssh-keys-import.rsc index 176c1b4..9467525 100644 --- a/mod/ssh-keys-import.rsc +++ b/mod/ssh-keys-import.rsc @@ -94,9 +94,7 @@ :foreach KeyVal in=[ :deserialize $Keys delimiter=" " from=dsv options=dsv.plain ] do={ :local Continue false; :if ($KeyVal->0 = "ssh-ed25519" || $KeyVal->0 = "ssh-rsa") do={ - :do { - $SSHKeysImport ($KeyVal->0 . " " . $KeyVal->1 . " " . $KeyVal->2) $User; - } on-error={ + :if ([ $SSHKeysImport ($KeyVal->0 . " " . $KeyVal->1 . " " . $KeyVal->2) $User ] = false) do={ $LogPrint warning $0 ("Failed importing key for user '" . $User . "'."); } :set Continue true;