public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] Do not try to source stray directories in bashrc paths
@ 2014-11-29 11:30 Michał Górny
  2014-11-29 15:32 ` Zac Medico
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2014-11-29 11:30 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

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..46c3a03 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 && ! -d $1 ]]; then
 		local debug_on=false
 		if [[ "$PORTAGE_DEBUG" == "1" ]] && [[ "${-/x/}" == "$-" ]]; then
 			debug_on=true
-- 
2.1.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-29 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-11-29 19:45     ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox