diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh
index f25d7e97657a85048ba27ddcd72b78614af53a9e..0f1a6aaf81e29d5eefef56568619a684efc79a5d 100755
--- a/src/objective-c/tests/run_tests.sh
+++ b/src/objective-c/tests/run_tests.sh
@@ -28,8 +28,7 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-# Return to current directory on error.
-trap 'cd - > /dev/null; exit 1' ERR
+set -e
 
 cd $(dirname $0)
 
@@ -47,5 +46,3 @@ xcodebuild \
     -destination name="iPhone 6" \
     test \
     | egrep "$XCODEBUILD_FILTER" -
-
-cd - > /dev/null