]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
contrib: untrap before calling popd
authorSébastien Han <seb@redhat.com>
Mon, 28 Nov 2016 22:22:49 +0000 (23:22 +0100)
committerSébastien Han <seb@redhat.com>
Mon, 28 Nov 2016 22:22:49 +0000 (23:22 +0100)
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 <seb@redhat.com>
contrib/push-roles-to-ansible-galaxy.sh

index a62583bd8f4bc6cf6c1515fa3edbae9f5964b4be..9fcc38676456e8581f0c0ffb65f8f637822a3a2c 100755 (executable)
@@ -76,4 +76,5 @@ for ROLE in $ROLES; do
     reset_hard_origin
   done
 done
+trap - EXIT ERR
 popd &> /dev/null