1 |
commit: 46ae35f6a5aaffff1358dfed369be82569fce786 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 1 00:03:34 2023 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 2 20:35:30 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=46ae35f6 |
7 |
|
8 |
egencache: pass through PATH to fix tests with empty profile.env |
9 |
|
10 |
portage.tests.emerge.test_simple.SimpleEmergeTestCase was failing. |
11 |
|
12 |
/usr/bin/env: 'bash': No such file or directory |
13 |
|
14 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
15 |
|
16 |
bin/egencache | 4 ++++ |
17 |
1 file changed, 4 insertions(+) |
18 |
|
19 |
diff --git a/bin/egencache b/bin/egencache |
20 |
index 5f5664131..8c18edaeb 100755 |
21 |
--- a/bin/egencache |
22 |
+++ b/bin/egencache |
23 |
@@ -1130,6 +1130,10 @@ try: |
24 |
# completely controlled by commandline arguments. |
25 |
env = {} |
26 |
|
27 |
+ # Pass through PATH to allow testing with an empty profile.env. |
28 |
+ if "PATH" in os.environ: |
29 |
+ env["PATH"] = os.environ["PATH"] |
30 |
+ |
31 |
if not sys.stdout.isatty() or os.environ.get("NOCOLOR", "").lower() in ( |
32 |
"yes", |
33 |
"true", |