dohtml: restore cwd for __helpers_die
authorZac Medico <zmedico@gentoo.org>
Sun, 12 May 2013 20:52:06 +0000 (13:52 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 12 May 2013 20:52:06 +0000 (13:52 -0700)
bin/ebuild-helpers/dohtml

index 4be9bc2eb8de0088722f2bebc0a9f0d8c5b3ff5f..fd9efd26700d59bc04c295e6e793efb1db5bc5e3 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2009-2010 Gentoo Foundation
+# Copyright 2009-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -13,5 +13,7 @@ PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
        "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
 
 ret=$?
+# Restore cwd for display by __helpers_die
+cd "${__PORTAGE_HELPER_CWD}"
 [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret