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",

Reply via email to