1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-22 04:43:00 +00:00

simple command dependencies

This commit is contained in:
Jörn-Michael Miehe 2020-08-17 10:57:45 +02:00
parent 387b7406b5
commit 4c70b7b2c1
6 changed files with 6 additions and 6 deletions

View file

@ -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()

View file

@ -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

View file

@ -18,7 +18,7 @@ class CmdCommand(ProjectCommand):
help="runs `docker-compose <cmd>`"
)
def run(self, config, args):
def run(self, runner, config, args):
import shlex
# run with split compose_cmd argument

View file

@ -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']

View file

@ -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)

View file

@ -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)