From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1473405-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id CAC6615800F
	for <garchives@archives.gentoo.org>; Mon,  2 Jan 2023 20:46:02 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 99758E07E1;
	Mon,  2 Jan 2023 20:46:01 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 84913E07E1
	for <gentoo-commits@lists.gentoo.org>; Mon,  2 Jan 2023 20:46:01 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 7BED4335D4C
	for <gentoo-commits@lists.gentoo.org>; Mon,  2 Jan 2023 20:46:00 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id D09997FA
	for <gentoo-commits@lists.gentoo.org>; Mon,  2 Jan 2023 20:45:58 +0000 (UTC)
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" <floppym@gentoo.org>
Message-ID: <1672691730.46ae35f6a5aaffff1358dfed369be82569fce786.floppym@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/egencache
X-VCS-Directories: bin/
X-VCS-Committer: floppym
X-VCS-Committer-Name: Mike Gilbert
X-VCS-Revision: 46ae35f6a5aaffff1358dfed369be82569fce786
X-VCS-Branch: master
Date: Mon,  2 Jan 2023 20:45:58 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: fa4b5cb5-b36b-4d4e-b5d6-67d5316e97d6
X-Archives-Hash: 72bb43d8e8c3b86ce97a6cf1e03dcd01

commit:     46ae35f6a5aaffff1358dfed369be82569fce786
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  1 00:03:34 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jan  2 20:35:30 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=46ae35f6

egencache: pass through PATH to fix tests with empty profile.env

portage.tests.emerge.test_simple.SimpleEmergeTestCase was failing.

  /usr/bin/env: 'bash': No such file or directory

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 bin/egencache | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/egencache b/bin/egencache
index 5f5664131..8c18edaeb 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -1130,6 +1130,10 @@ try:
         # completely controlled by commandline arguments.
         env = {}
 
+        # Pass through PATH to allow testing with an empty profile.env.
+        if "PATH" in os.environ:
+            env["PATH"] = os.environ["PATH"]
+
         if not sys.stdout.isatty() or os.environ.get("NOCOLOR", "").lower() in (
             "yes",
             "true",