diff --git a/src/molecule/dependency/base.py b/src/molecule/dependency/base.py index 423cee9c6..96530dbec 100644 --- a/src/molecule/dependency/base.py +++ b/src/molecule/dependency/base.py @@ -60,7 +60,7 @@ def __init__(self, config: Config) -> None: config: An instance of a Molecule config. """ self._config = config - self._sh_command: list[str] = [] + self._sh_command: str | list[str] = [] def execute_with_retries(self) -> None: """Run dependency downloads with retry and timed back-off.""" diff --git a/src/molecule/dependency/shell.py b/src/molecule/dependency/shell.py index a5a216335..f1f648fea 100644 --- a/src/molecule/dependency/shell.py +++ b/src/molecule/dependency/shell.py @@ -83,7 +83,7 @@ def __init__(self, config: Config) -> None: config: Molecule Config instance. """ super().__init__(config) - self._sh_command: list[str] = [] + self._sh_command = "" @property def command(self) -> str: @@ -105,7 +105,7 @@ def default_options(self) -> MutableMapping[str, str | bool]: def bake(self) -> None: """Bake a ``shell`` command so it's ready to execute.""" - self._sh_command = [self.command] + self._sh_command = self.command def execute(self, action_args: list[str] | None = None) -> None: # noqa: ARG002 """Execute the dependency solver. diff --git a/src/molecule/util.py b/src/molecule/util.py index 844c012b8..dbd934da7 100644 --- a/src/molecule/util.py +++ b/src/molecule/util.py @@ -154,7 +154,7 @@ def sysexit_with_message( def run_command( # noqa: PLR0913 - cmd: list[str], + cmd: str | list[str], env: dict[str, str] | None = None, cwd: Path | None = None, *,