mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-12-25 18:42:59 +00:00
simple command dependencies
This commit is contained in:
parent
387b7406b5
commit
4c70b7b2c1
6 changed files with 6 additions and 6 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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']
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue