From fdb275bcb5368ee8b10093bfa76aad0c7d66e677 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Tue, 19 Oct 2021 22:20:33 -0400 Subject: [PATCH] we can print the failing command in kaya-client ... because it's not in a complicated pipe. 'kaya' however cannot use that, otherwise it will complain about 'tee' rather than 'ssh', and if you force an error message about ssh, none of the parameters are expanded --- kaya-client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kaya-client b/kaya-client index db3a4fb..d0235a0 100755 --- a/kaya-client +++ b/kaya-client @@ -21,7 +21,7 @@ if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4 set -eE -o pipefail -trap 'echo "kaya-client: backup failed" >&2' ERR +trap 'echo kaya-client: command exit code $?: $BASH_COMMAND >&2' ERR preferred_protocol_version=2 -- 2.25.1