Tristan Maat pushed to branch 507-some-log-lines-appear-to-be-duplicates at BuildStream / buildstream
Commits:
-
b32c2850
by Tristan Maat at 2018-07-26T17:09:25Z
1 changed file:
Changes:
1 | 1 |
#
|
2 | 2 |
# Copyright (C) 2016 Codethink Limited
|
3 |
+# Copyright (C) 2018 Bloomberg Finance LP
|
|
3 | 4 |
#
|
4 | 5 |
# This program is free software; you can redistribute it and/or
|
5 | 6 |
# modify it under the terms of the GNU Lesser General Public
|
... | ... | @@ -231,13 +232,12 @@ class BuildElement(Element): |
231 | 232 |
return commands
|
232 | 233 |
|
233 | 234 |
def __run_command(self, sandbox, cmd, cmd_name):
|
234 |
- with self.timed_activity("Running {}".format(cmd_name)):
|
|
235 |
- self.status("Running {}".format(cmd_name), detail=cmd)
|
|
236 |
- |
|
237 |
- # Note the -e switch to 'sh' means to exit with an error
|
|
238 |
- # if any untested command fails.
|
|
239 |
- #
|
|
240 |
- exitcode = sandbox.run(['sh', '-c', '-e', cmd + '\n'],
|
|
241 |
- SandboxFlags.ROOT_READ_ONLY)
|
|
242 |
- if exitcode != 0:
|
|
243 |
- raise ElementError("Command '{}' failed with exitcode {}".format(cmd, exitcode))
|
|
235 |
+ self.status("Running {}".format(cmd_name), detail=cmd)
|
|
236 |
+ |
|
237 |
+ # Note the -e switch to 'sh' means to exit with an error
|
|
238 |
+ # if any untested command fails.
|
|
239 |
+ #
|
|
240 |
+ exitcode = sandbox.run(['sh', '-c', '-e', cmd + '\n'],
|
|
241 |
+ SandboxFlags.ROOT_READ_ONLY)
|
|
242 |
+ if exitcode != 0:
|
|
243 |
+ raise ElementError("Command '{}' failed with exitcode {}".format(cmd, exitcode))
|