def main(ctx): """Main CumulusCI CLI entry point. This runs as the first step in processing any CLI command. """ check_latest_version() init_logger() try: config = CliConfig() except click.UsageError as e: click.echo(str(e)) sys.exit(1) config.check_cumulusci_version() # Attach the config object to the click context # so it can be accessed by other commands using `click.pass_obj` ctx.obj = config
def test_check_cumulusci_version(self): config = CliConfig() config.project_config.minimum_cumulusci_version = "999" with self.assertRaises(click.UsageError): config.check_cumulusci_version()