public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 1/3] bash-completion-r1.eclass: Die on pkg-config getter failure
Date: Fri, 27 Nov 2015 14:53:37 +0100	[thread overview]
Message-ID: <1448632419-11782-2-git-send-email-mgorny@gentoo.org> (raw)
In-Reply-To: <1448632419-11782-1-git-send-email-mgorny@gentoo.org>

---
 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
 }
 
-- 
2.6.3



  reply	other threads:[~2015-11-27 13:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 13:53 [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + EAPI 6 Michał Górny
2015-11-27 13:53 ` Michał Górny [this message]
2015-11-27 13:53 ` [gentoo-dev] [PATCH 2/3] bash-completion-r1.eclass: bashcomp_alias, always return on first failure Michał Górny
2015-11-27 13:53 ` [gentoo-dev] [PATCH 3/3] bash-completion-r1.eclass: Enable EAPI 6 Michał Górny
2015-11-29 10:07 ` [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + " Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448632419-11782-2-git-send-email-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox