Skip to content

Commit

Permalink
ruby-ng.eclass: add missing '|| die' on pushd/popd
Browse files Browse the repository at this point in the history
Reviewed-By: Hans de Graaff <[email protected]>
  • Loading branch information
Julian Ospald committed Oct 26, 2015
1 parent a8eb466 commit 6fb9fa1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions eclass/ruby-ng.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ _ruby_invoke_environment() {
eqawarn "Using * expansion of S is deprecated. Use EAPI and RUBY_S instead."
;;
esac
pushd "${WORKDIR}"/all &>/dev/null
pushd "${WORKDIR}"/all &>/dev/null || die
sub_S=$(eval ls -d "${sub_S}" 2>/dev/null)
popd &>/dev/null
popd &>/dev/null || die
fi

environment=$1; shift
Expand All @@ -335,16 +335,16 @@ _ruby_invoke_environment() {
S="${my_WORKDIR}"/"${sub_S}"

if [[ -d "${S}" ]]; then
pushd "$S" &>/dev/null
pushd "$S" &>/dev/null || die
elif [[ -d "${my_WORKDIR}" ]]; then
pushd "${my_WORKDIR}" &>/dev/null
pushd "${my_WORKDIR}" &>/dev/null || die
else
pushd "${WORKDIR}" &>/dev/null
pushd "${WORKDIR}" &>/dev/null || die
fi

ebegin "Running ${_PHASE:-${EBUILD_PHASE}} phase for $environment"
"$@"
popd &>/dev/null
popd &>/dev/null || die

S=${old_S}
}
Expand Down Expand Up @@ -392,7 +392,7 @@ ruby-ng_pkg_setup() {
# Unpack the source archive.
ruby-ng_src_unpack() {
mkdir "${WORKDIR}"/all
pushd "${WORKDIR}"/all &>/dev/null
pushd "${WORKDIR}"/all &>/dev/null || die

# We don't support an each-unpack, it's either all or nothing!
if type all_ruby_unpack &>/dev/null; then
Expand All @@ -401,7 +401,7 @@ ruby-ng_src_unpack() {
[[ -n ${A} ]] && unpack ${A}
fi

popd &>/dev/null
popd &>/dev/null || die
}

_ruby_apply_patches() {
Expand Down

0 comments on commit 6fb9fa1

Please sign in to comment.