mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-11-22 12:53:00 +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}")
|
logging.debug(f"Running '{cmd}' with args: {args}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cmd.run(LoadedConfig.get(), args)
|
cmd.run(self, LoadedConfig.get(), args)
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print()
|
print()
|
||||||
|
|
|
@ -20,7 +20,7 @@ class SubCommand:
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.__name
|
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"""
|
"""actually run command with this dir's config and parsed CLI args"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ class CmdCommand(ProjectCommand):
|
||||||
help="runs `docker-compose <cmd>`"
|
help="runs `docker-compose <cmd>`"
|
||||||
)
|
)
|
||||||
|
|
||||||
def run(self, config, args):
|
def run(self, runner, config, args):
|
||||||
import shlex
|
import shlex
|
||||||
|
|
||||||
# run with split compose_cmd argument
|
# run with split compose_cmd argument
|
||||||
|
|
|
@ -18,7 +18,7 @@ class LogsCommand(ServiceCommand):
|
||||||
help="output appended data as log grows"
|
help="output appended data as log grows"
|
||||||
)
|
)
|
||||||
|
|
||||||
def run(self, config, args):
|
def run(self, runner, config, args):
|
||||||
# include timestamps
|
# include timestamps
|
||||||
compose_cmd = ['logs', '-t']
|
compose_cmd = ['logs', '-t']
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class ShCommand(ServiceCommand):
|
||||||
help="shell to spawn"
|
help="shell to spawn"
|
||||||
)
|
)
|
||||||
|
|
||||||
def run(self, config, args):
|
def run(self, runner, config, args):
|
||||||
compose_cmd = ['exec', args.services[0]]
|
compose_cmd = ['exec', args.services[0]]
|
||||||
shell = _find_shell(config, args, compose_cmd)
|
shell = _find_shell(config, args, compose_cmd)
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,5 @@ class ShowCommand(SubCommand):
|
||||||
description="Show effective kiwi.yml"
|
description="Show effective kiwi.yml"
|
||||||
)
|
)
|
||||||
|
|
||||||
def run(self, config, args):
|
def run(self, runner, config, args):
|
||||||
print(config)
|
print(config)
|
||||||
|
|
Loading…
Reference in a new issue