def send_command(self, args):
command = "%s exec -i %s %s %s %s %s %s %s" % (
self.docker_command,
"-t" if sys.stdout.isatty() else "",
"--privileged" if self.docker_run_privileged else "",
self.instance_name,
self.command,
("--bazelrc=%s" % self.bazel_rc_file
if self.bazel_rc_file and self.command else ""),
("--output_user_root=%s --output_base=%s" % (
TEMP_BAZEL_OUTPUT_USER_ROOT, self.bazel_output_base)
if self.command and self.bazel_output_base
else "--output_user_root=%s" % self.bazel_user_output_root
if self.command and self.bazel_user_output_root
else ""),
'"%s"' % '" "'.join(args))
command = self._with_docker_machine(command)
return os.WEXITSTATUS(os.system(command))
评论列表
文章目录