summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildstream/buildelement.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py
index d729eaa81..180bb86ab 100644
--- a/buildstream/buildelement.py
+++ b/buildstream/buildelement.py
@@ -233,14 +233,13 @@ class BuildElement(Element):
return commands
def __run_command(self, sandbox, cmd, cmd_name):
- with self.timed_activity("Running {}".format(cmd_name)):
- self.status("Running {}".format(cmd_name), detail=cmd)
-
- # Note the -e switch to 'sh' means to exit with an error
- # if any untested command fails.
- #
- exitcode = sandbox.run(['sh', '-c', '-e', cmd + '\n'],
- SandboxFlags.ROOT_READ_ONLY)
- if exitcode != 0:
- raise ElementError("Command '{}' failed with exitcode {}".format(cmd, exitcode),
- collect=self.get_variable('install-root'))
+ self.status("Running {}".format(cmd_name), detail=cmd)
+
+ # Note the -e switch to 'sh' means to exit with an error
+ # if any untested command fails.
+ #
+ exitcode = sandbox.run(['sh', '-c', '-e', cmd + '\n'],
+ SandboxFlags.ROOT_READ_ONLY)
+ if exitcode != 0:
+ raise ElementError("Command '{}' failed with exitcode {}".format(cmd, exitcode),
+ collect=self.get_variable('install-root'))