From: Sébastien Han Date: Mon, 28 Nov 2016 22:22:49 +0000 (+0100) Subject: contrib: untrap before calling popd X-Git-Tag: v2.1.0~39 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3bdae23e429e0ad66b11c6bfd4bc02843d07e6c8;p=ceph-ansible.git contrib: untrap before calling popd we need to untrap before calling popd if the script is being run from a directory different than the git repo. popd will go back to the previous directory and trap will execute reset_hard_origin function on EXIT. If we are not in the righ directory, this will fail. Signed-off-by: Sébastien Han --- diff --git a/contrib/push-roles-to-ansible-galaxy.sh b/contrib/push-roles-to-ansible-galaxy.sh index a62583bd8..9fcc38676 100755 --- a/contrib/push-roles-to-ansible-galaxy.sh +++ b/contrib/push-roles-to-ansible-galaxy.sh @@ -76,4 +76,5 @@ for ROLE in $ROLES; do reset_hard_origin done done +trap - EXIT ERR popd &> /dev/null