aboutsummaryrefslogtreecommitdiff
path: root/upload-machine
diff options
context:
space:
mode:
Diffstat (limited to 'upload-machine')
-rwxr-xr-xupload-machine3
1 files changed, 2 insertions, 1 deletions
diff --git a/upload-machine b/upload-machine
index cffcd7b..8d6e730 100755
--- a/upload-machine
+++ b/upload-machine
@@ -14,7 +14,8 @@ usage="usage: $0 [<options>] <host> <new-subvol> [<old-subvol>]"
owd="$(pwd)"
trap "{ cd '$owd'; exit 1; }" ERR
-set -o errtrace # Trap in functions.
+set -o errtrace -o pipefail # Trap in functions.
+ # Fail if any pipe command fails.
function info () { echo "$*" 1>&2; }
function error () { info "$*"; exit 1; }