diff options
| author | tv <tv@krebsco.de> | 2026-11-24 05:34:38 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-24 05:42:04 +0000 |
| commit | d9a22706f74adc966198907d9df5986b551bbaa0 (patch) | |
| tree | 64b53d279572671992cf95f4537ef33a335a13bc | |
| parent | 633d477ca424f3c56cc338d1820eb9d8adfca1a8 (diff) | |
krops.nix: quote the commands for the builder's shell
| -rw-r--r-- | krops.nix | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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) |
