Simplify by removing shlex.quote and shlex.split when using EnvironmentExecutor

This commit is contained in:
Yannick Jadoul
2020-07-19 17:37:25 +02:00
parent 3a2d7a21b1
commit 28af49a006
2 changed files with 6 additions and 8 deletions
+2 -2
View File
@@ -180,9 +180,9 @@ class DockerContainer:
'import sys, json, os; json.dump(os.environ.copy(), sys.stdout)'
], capture_output=True))
def environment_executor(self, command: str, environment: Dict[str, str]) -> str:
def environment_executor(self, command: List[str], environment: Dict[str, str]) -> str:
# used as an EnvironmentExecutor to evaluate commands and capture output
return self.call(shlex.split(command), env=environment)
return self.call(command, env=environment)
def shell_quote(path: PurePath) -> str: