utils: fail on sftp errors

This commit is contained in:
Astro 2021-06-19 01:15:29 +02:00
parent 110fe11f00
commit 11a40de18a
1 changed files with 4 additions and 2 deletions

View File

@ -60,8 +60,10 @@ rec {
echo win-put $1 -\> $2 echo win-put $1 -\> $2
${pkgs.sshpass}/bin/sshpass -p1234 -- \ ${pkgs.sshpass}/bin/sshpass -p1234 -- \
${pkgs.openssh}/bin/sftp -r -P 2022 ${sshOpts} \ ${pkgs.openssh}/bin/sftp -r -P 2022 ${sshOpts} \
wfvm@localhost <<< "cd $2 wfvm@localhost -b- << EOF
put $1" cd $2
put $1
EOF
''; '';
win-get = pkgs.writeShellScriptBin "win-get" '' win-get = pkgs.writeShellScriptBin "win-get" ''
set -e set -e