Benjamin Schubert pushed to branch bschubert/fix-command-sandbox at BuildStream / buildstream
Commits:
-
d7ab73ed
by Benjamin Schubert at 2018-10-25T11:04:07Z
-
9dc6bcf2
by Benjamin Schubert at 2018-10-25T11:04:07Z
1 changed file:
Changes:
... | ... | @@ -66,15 +66,15 @@ class SandboxBwrap(Sandbox): |
66 | 66 |
cwd = self._get_work_directory(cwd=cwd)
|
67 | 67 |
env = self._get_environment(cwd=cwd, env=env)
|
68 | 68 |
|
69 |
+ # We want command args as a list of strings
|
|
70 |
+ if isinstance(command, str):
|
|
71 |
+ command = [command]
|
|
72 |
+ |
|
69 | 73 |
if not self._has_command(command[0], env):
|
70 | 74 |
raise SandboxError("Staged artifacts do not provide command "
|
71 | 75 |
"'{}'".format(command[0]),
|
72 | 76 |
reason='missing-command')
|
73 | 77 |
|
74 |
- # We want command args as a list of strings
|
|
75 |
- if isinstance(command, str):
|
|
76 |
- command = [command]
|
|
77 |
- |
|
78 | 78 |
# Create the mount map, this will tell us where
|
79 | 79 |
# each mount point needs to be mounted from and to
|
80 | 80 |
mount_map = MountMap(self, flags & SandboxFlags.ROOT_READ_ONLY)
|