Fix multi argument commands
This commit is contained in:
parent
513c3e9bac
commit
5256a81025
|
@ -174,7 +174,7 @@ def abra(*args, machine_output=False, ignore_error=False):
|
|||
logging.debug(f"run command: {' '.join(command)}")
|
||||
process = subprocess.run(command, capture_output=True)
|
||||
if process.stderr:
|
||||
logging.debug(process.stderr.decode())
|
||||
logging.warning(process.stderr.decode())
|
||||
if process.stdout:
|
||||
logging.debug(process.stdout.decode())
|
||||
if process.returncode and not ignore_error:
|
||||
|
@ -389,12 +389,12 @@ def execute_cmds(app_config):
|
|||
return
|
||||
for cmd in all_cmds:
|
||||
container = cmd.split()[0]
|
||||
cmd = cmd.split()[1]
|
||||
cmd = cmd.split()[1:]
|
||||
print(f"Run '{cmd}' in {domain}:{container}")
|
||||
if container == "local":
|
||||
print(abra("app", "cmd", "--local", domain, cmd, ignore_error=True))
|
||||
print(abra("app", "cmd", "--local", domain, *cmd, ignore_error=True))
|
||||
else:
|
||||
print(abra("app", "cmd", domain, container, cmd, ignore_error=True))
|
||||
print(abra("app", "cmd", domain, container, *cmd, ignore_error=True))
|
||||
|
||||
|
||||
@click.group()
|
||||
|
|
Loading…
Reference in New Issue