@@ -53,6 +53,7 @@ class Task(NamedTuple):
|
||||
|
||||
|
||||
class Entry:
|
||||
DEFAULT_EXECUTOR: type[CommandExecutor] = CommandExecutor
|
||||
_logger = logger
|
||||
|
||||
def __init__(
|
||||
@@ -61,11 +62,13 @@ class Entry:
|
||||
variables: Variables,
|
||||
basepath: Path,
|
||||
rootpath: Path,
|
||||
executor: type[CommandExecutor] | None = None,
|
||||
):
|
||||
self._tasks = tasks
|
||||
self._variables = variables
|
||||
self._basepath = basepath
|
||||
self._roopath = rootpath
|
||||
self._executor = executor or self.DEFAULT_EXECUTOR
|
||||
|
||||
@property
|
||||
def sensentive_data(self):
|
||||
@@ -103,7 +106,7 @@ class Entry:
|
||||
if key == task.key:
|
||||
self._logger.info("🔵 %s %s", task.key, self)
|
||||
for command in task.commands:
|
||||
CommandExecutor(command).run(
|
||||
self._executor(command).run(
|
||||
(task.cwd and Path(task.cwd)) or self._basepath
|
||||
)
|
||||
c += 1
|
||||
|
||||
Reference in New Issue
Block a user