From 3bdae23e429e0ad66b11c6bfd4bc02843d07e6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 28 Nov 2016 23:22:49 +0100 Subject: [PATCH] contrib: untrap before calling popd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- contrib/push-roles-to-ansible-galaxy.sh | 1 + 1 file changed, 1 insertion(+) 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