Pass along env to run_with_build_fixers.

This commit is contained in:
Jelmer Vernooij 2021-03-22 02:10:31 +00:00
parent d98fdbc14e
commit fb6d15172a
No known key found for this signature in database
GPG key ID: 579C160D4C9E23E8

View file

@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import logging
from typing import List, Optional
from typing import List, Optional, Dict
from buildlog_consultant.common import (
find_build_failure_description,
@ -63,11 +63,11 @@ class DependencyContext(object):
raise NotImplementedError(self.add_dependency)
def run_with_build_fixers(session: Session, args: List[str], fixers: List[BuildFixer]):
def run_with_build_fixers(session: Session, args: List[str], fixers: List[BuildFixer], env: Optional[Dict[str, str]] = None):
fixed_errors = []
while True:
try:
retcode, contents = run_with_tee(session, args)
retcode, contents = run_with_tee(session, args, env=env)
except FileNotFoundError:
error = MissingCommand(args[0])
retcode = 1