You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
724 B
Python
32 lines
724 B
Python
from __future__ import annotations
|
|
|
|
from pathlib import PurePath
|
|
from typing import Optional
|
|
|
|
from attrs import define
|
|
|
|
from .base import CommandArgs
|
|
from .command import ArgCommand
|
|
from .completed import CompletedExec
|
|
from .execution import ExecutorTarget
|
|
|
|
|
|
@define
|
|
class BinaryExecutor(ExecutorTarget):
|
|
binary_args: CommandArgs
|
|
|
|
def exec_cmd(
|
|
self,
|
|
*,
|
|
command: CommandArgs,
|
|
check: bool,
|
|
capture_stdout: bool,
|
|
work_dir: Optional[PurePath],
|
|
) -> CompletedExec:
|
|
return super().exec_cmd(
|
|
command=CommandArgs(self.binary_args + command),
|
|
check=check,
|
|
capture_stdout=capture_stdout,
|
|
work_dir=work_dir,
|
|
)
|