commit:     c3ebc643d5a04cdc34518e6b3b3b37c3238391fa
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 29 11:12:21 2014 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Dec  2 23:05:39 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c3ebc643

Do not try to source stray directories in bashrc paths

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 2ed1335..9c60a41 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

Reply via email to