call app.setup first

This commit is contained in:
Izalia Mae 2022-12-20 06:05:06 -05:00
parent 04ae6a8851
commit 4979d598f1

View file

@ -31,6 +31,9 @@ def cli(ctx, config):
global app global app
app = Application(config) app = Application(config)
if ctx.invoked_subcommand != 'convert':
app.setup()
if not ctx.invoked_subcommand: if not ctx.invoked_subcommand:
if app.config.host.endswith('example.com'): if app.config.host.endswith('example.com'):
cli_setup.callback() cli_setup.callback()
@ -38,9 +41,6 @@ def cli(ctx, config):
else: else:
cli_run.callback() cli_run.callback()
if ctx.invoked_subcommand != 'convert':
app.setup()
@cli.command('convert') @cli.command('convert')
@click.option('--old-config', '-o', help='path to the old relay config') @click.option('--old-config', '-o', help='path to the old relay config')