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