diff --git a/src/kiwi/runner.py b/src/kiwi/runner.py index f18bdb4..186029b 100644 --- a/src/kiwi/runner.py +++ b/src/kiwi/runner.py @@ -36,7 +36,7 @@ class Runner: logging.debug(f"Running '{cmd}' with args: {args}") try: - cmd.run(LoadedConfig.get(), args) + cmd.run(self, LoadedConfig.get(), args) except KeyboardInterrupt: print() diff --git a/src/kiwi/subcommands/_subcommand.py b/src/kiwi/subcommands/_subcommand.py index b886d92..59b04f8 100644 --- a/src/kiwi/subcommands/_subcommand.py +++ b/src/kiwi/subcommands/_subcommand.py @@ -20,7 +20,7 @@ class SubCommand: def __str__(self): return self.__name - def run(self, config, args): + def run(self, runner, config, args): """actually run command with this dir's config and parsed CLI args""" pass diff --git a/src/kiwi/subcommands/cmd.py b/src/kiwi/subcommands/cmd.py index d89f6f8..4aba79c 100644 --- a/src/kiwi/subcommands/cmd.py +++ b/src/kiwi/subcommands/cmd.py @@ -18,7 +18,7 @@ class CmdCommand(ProjectCommand): help="runs `docker-compose `" ) - def run(self, config, args): + def run(self, runner, config, args): import shlex # run with split compose_cmd argument diff --git a/src/kiwi/subcommands/logs.py b/src/kiwi/subcommands/logs.py index b63bc21..178713e 100644 --- a/src/kiwi/subcommands/logs.py +++ b/src/kiwi/subcommands/logs.py @@ -18,7 +18,7 @@ class LogsCommand(ServiceCommand): help="output appended data as log grows" ) - def run(self, config, args): + def run(self, runner, config, args): # include timestamps compose_cmd = ['logs', '-t'] diff --git a/src/kiwi/subcommands/sh.py b/src/kiwi/subcommands/sh.py index 3dd6a40..9c2b1df 100644 --- a/src/kiwi/subcommands/sh.py +++ b/src/kiwi/subcommands/sh.py @@ -82,7 +82,7 @@ class ShCommand(ServiceCommand): help="shell to spawn" ) - def run(self, config, args): + def run(self, runner, config, args): compose_cmd = ['exec', args.services[0]] shell = _find_shell(config, args, compose_cmd) diff --git a/src/kiwi/subcommands/show.py b/src/kiwi/subcommands/show.py index 7921af5..9b65da4 100644 --- a/src/kiwi/subcommands/show.py +++ b/src/kiwi/subcommands/show.py @@ -11,5 +11,5 @@ class ShowCommand(SubCommand): description="Show effective kiwi.yml" ) - def run(self, config, args): + def run(self, runner, config, args): print(config)