From 29fd3353c151406b11d6789da59555769a79c24c Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Mon, 11 Feb 2019 14:11:16 +0100 Subject: [PATCH] ensure dotdrop exit code is returned --- dotdrop.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dotdrop.sh b/dotdrop.sh index 1db8b11..4559faa 100755 --- a/dotdrop.sh +++ b/dotdrop.sh @@ -22,11 +22,14 @@ cfg="${cur}/config.yaml" sub="dotdrop" # pivot -cd "${cur}" || { echo "Directory \"${cur}\" doesn't exist, aborting." && exit; } +cd "${cur}" || { echo "Directory \"${cur}\" doesn't exist, aborting." && exit 1; } # init/update the submodule git submodule update --init --recursive git submodule update --remote dotdrop # launch dotdrop PYTHONPATH=dotdrop python3 -m dotdrop.dotdrop "${args[@]}" +ret="$?" # pivot back -cd "${opwd}" || { echo "Directory \"${opwd}\" doesn't exist, aborting." && exit; } +cd "${opwd}" || { echo "Directory \"${opwd}\" doesn't exist, aborting." && exit 1; } +# exit with dotdrop exit code +exit ${ret}