changes in code from code review
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import bashlex # type: ignore
|
||||
|
||||
from typing import Dict, List, MutableMapping
|
||||
from typing import Dict, List, Mapping
|
||||
|
||||
from . import bashlex_eval
|
||||
|
||||
@@ -61,7 +61,7 @@ class ParsedEnvironment:
|
||||
def __init__(self, assignments: List[EnvironmentAssignment]):
|
||||
self.assignments = assignments
|
||||
|
||||
def as_dictionary(self, prev_environment: MutableMapping[str, str]) -> Dict[str, str]:
|
||||
def as_dictionary(self, prev_environment: Mapping[str, str]) -> Dict[str, str]:
|
||||
environment = dict(**prev_environment)
|
||||
|
||||
for assignment in self.assignments:
|
||||
|
||||
+13
-11
@@ -134,22 +134,24 @@ def build(options: BuildOptions) -> None:
|
||||
call(['docker', 'start', container_name])
|
||||
|
||||
if options.before_all:
|
||||
before_all_prepared = prepare_command(options.before_all, project='/project', package=options.package_dir)
|
||||
task = """
|
||||
PS4=' + '
|
||||
call(
|
||||
['docker', 'exec', '-i', container_name] + shell_cmd,
|
||||
universal_newlines=True,
|
||||
input='''
|
||||
PS4=' + '
|
||||
|
||||
set -o errexit
|
||||
set -o xtrace
|
||||
set -o errexit
|
||||
set -o xtrace
|
||||
|
||||
{environment_exports}
|
||||
{environment_exports}
|
||||
|
||||
{before_all_prepared}
|
||||
sh -c {before_all}
|
||||
|
||||
""".format(
|
||||
environment_exports='\n'.join(options.environment.as_shell_commands()),
|
||||
before_all_prepared=before_all_prepared
|
||||
'''.format(
|
||||
environment_exports='\n'.join(options.environment.as_shell_commands()),
|
||||
before_all=prepare_command(options.before_all, project='/project', package=container_package_dir)
|
||||
)
|
||||
)
|
||||
call(['docker', 'exec', '-i', container_name] + shell_cmd, universal_newlines=True, input=task)
|
||||
|
||||
for config in platform_configs:
|
||||
if options.dependency_constraints:
|
||||
|
||||
Reference in New Issue
Block a user