From d9a22706f74adc966198907d9df5986b551bbaa0 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 24 Nov 2026 05:34:38 +0000 Subject: krops.nix: quote the commands for the builder's shell --- krops.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/krops.nix b/krops.nix index 2273ef8d..dfa2121d 100644 --- a/krops.nix +++ b/krops.nix @@ -313,8 +313,9 @@ rec { ${nix} copy --no-check-sigs \ --from ssh-ng://"$builder" --to ${q targetURL} "$system" '' else /* sh */ '' - if ! check=$(ssh $builder_ssh_opts "$builder" ssh -o BatchMode=yes -o ConnectTimeout=10 \ - ${targetSSHOpts} ${q targetDest} true 2>&1) + if ! check=$(ssh $builder_ssh_opts "$builder" ${q /* sh */ + "ssh -o BatchMode=yes -o ConnectTimeout=10 ${targetSSHOpts} ${q targetDest} true" + } 2>&1) then echo "$name: error: $builder can't log in to "${q targetDest}":" >&2 printf '%s\n' "$check" >&2 @@ -335,8 +336,9 @@ rec { exit 1 fi echo "$name: copying from $builder..." >&2 - ssh $builder_ssh_opts "$builder" "NIX_SSHOPTS='${targetSSHOpts}' ${nix} copy --no-check-sigs \ - --to ${targetURL} $system" + ssh $builder_ssh_opts "$builder" ${q /* sh */ + "NIX_SSHOPTS=${q targetSSHOpts} ${nix} copy --no-check-sigs --to ${q targetURL} " + }"$system" ''} copy_end=$(date +%s) -- cgit v1.3.1