From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH] Do not try to source stray directories in bashrc paths
Date: Sat, 29 Nov 2014 20:26:33 +0100 [thread overview]
Message-ID: <1417289193-5402-1-git-send-email-mgorny@gentoo.org> (raw)
In-Reply-To: <5479E6F9.1050802@gentoo.org>
Check whether a particular bashrc path is not a directory before trying
to source it. Avoids unnecessary 'is a directory' errors.
---
bin/ebuild.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 658884a..0de51f7 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -421,7 +421,7 @@ __try_source() {
qa=false
shift
fi
- if [[ -r "$1" ]]; then
+ if [[ -r $1 && -f $1 ]]; then
local debug_on=false
if [[ "$PORTAGE_DEBUG" == "1" ]] && [[ "${-/x/}" == "$-" ]]; then
debug_on=true
--
2.1.3
next prev parent reply other threads:[~2014-11-29 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-29 11:30 [gentoo-portage-dev] [PATCH] Do not try to source stray directories in bashrc paths Michał Górny
2014-11-29 15:32 ` Zac Medico
2014-11-29 19:26 ` Michał Górny [this message]
2014-11-29 19:45 ` Zac Medico
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=1417289193-5402-1-git-send-email-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-portage-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