def handle_config_missing()

in wadebug/cli.py [0:0]


def handle_config_missing():
    permission_granted = click.confirm(
        click.style(
            "\nWADebug requires a config file: wadebug.conf.yml "
            "in the current directory in order to run full checks, "
            "but none has been found. "
            "Do you want to create the file now?",
            fg="yellow",
        )
    )

    if permission_granted:

        if Config().create_default_config_file():

            click.echo(
                "The config file has been created at {}. "
                "Please fill in the values and run wadebug commands again\n".format(
                    os.getcwd()
                )
            )

            sys.exit(0)
        else:
            click.secho(
                "\nUnable to create config file at {}. Error: {}\n"
                "Some checks will be skipped as a result.\n".format(
                    os.getcwd(), Config().create_exception
                ),
                fg="yellow",
            )

    else:
        click.secho(
            "\nYou have chosen not to create the config file. "
            "Some checks will be skipped as a result.\n",
            fg="yellow",
        )