diff options
author | 2018-06-22 10:42:03 +0200 | |
---|---|---|
committer | 2018-07-16 22:51:41 +0200 | |
commit | bef50010a4899db1896133fad0d6ca1d387b6ec2 (patch) | |
tree | 99de77a152fbd5c7fe67405d3cf2de43ff2bbef3 /eclass | |
parent | profiles/arch/amd64-fbsd: Unmask py2.7 target (diff) | |
download | gentoo-bef50010a4899db1896133fad0d6ca1d387b6ec2.tar.gz gentoo-bef50010a4899db1896133fad0d6ca1d387b6ec2.tar.bz2 gentoo-bef50010a4899db1896133fad0d6ca1d387b6ec2.zip |
eutils.eclass: make_wrapper, fix 'cd' error handling
Reorder the generated wrapper, and add '&&' after the 'cd' call so that
the wrapper will not try to execute the program if 'cd' command fails.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/eutils.eclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 81621df78e63..9b4767e1874a 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -148,7 +148,6 @@ make_wrapper() { ( echo '#!/bin/sh' - [[ -n ${chdir} ]] && printf 'cd "%s"\n' "${EPREFIX}${chdir}" if [[ -n ${libdir} ]] ; then local var if [[ ${CHOST} == *-darwin* ]] ; then @@ -164,6 +163,7 @@ make_wrapper() { fi EOF fi + [[ -n ${chdir} ]] && printf 'cd "%s" &&\n' "${EPREFIX}${chdir}" # We don't want to quote ${bin} so that people can pass complex # things as ${bin} ... "./someprog --args" printf 'exec %s "$@"\n' "${bin/#\//${EPREFIX}/}" |