commit:     e2b497dbdb03528badeaa83e6d4ec4849de49172
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 27 13:49:42 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Nov 29 10:07:23 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2b497db

bash-completion-r1.eclass: Die on pkg-config getter failure

 eclass/bash-completion-r1.eclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
index 2551973..9877baa 100644
--- a/eclass/bash-completion-r1.eclass
+++ b/eclass/bash-completion-r1.eclass
@@ -41,12 +41,13 @@ _bash-completion-r1_get_bashdir() {
        debug-print-function ${FUNCNAME} "${@}"
 
        if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
-               local path="$($(tc-getPKG_CONFIG) --variable=$1 
bash-completion)"
+               local path
+               path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) 
|| die
                # we need to return unprefixed, so strip from what pkg-config 
returns
                # to us, bug #477692
                echo "${path#${EPREFIX}}"
        else
-               echo $2
+               echo "${2}"
        fi
 }
 

Reply via email to