Exemplo n.º 1
0
 def execute(self):
   target = self.require_single_root_target()
   if self.is_binary(target):
     binary_path = self.context.products.get_data('exec_binary')[target]
     # TODO(cgibb): Wrap with workunit and stdout/stderr plumbing.
     res = Xargs.subprocess([binary_path]).execute(self.get_passthru_args())
     if res != 0:
       raise TaskError('{bin} exited non-zero ({res})'
                       .format(bin=os.path.basename(binary_path), res=res))
Exemplo n.º 2
0
 def execute(self):
     target = self.require_single_root_target()
     if self.is_binary(target):
         binary_path = self.context.products.get_data("exec_binary")[target]
         # TODO(cgibb): Wrap with workunit and stdout/stderr plumbing.
         res = Xargs.subprocess([binary_path]).execute(
             [*self.get_passthru_args(), *self.get_options().args]
         )
         if res != 0:
             raise TaskError(f"{os.path.basename(binary_path)} exited non-zero ({res})")