click.echo("{} The URL \"{}\" is unreachable.\n Check your network connection, and the URL and Secret of the endpoint.".format(click.style('Error:',fg='red',bold=True),url))
print()
time.sleep(1)
ifclick.confirm(click.style('Do you want to open the config file at {} with your default editor?'.format(user_config_path),fg="yellow"),abort=True):
print("(You can define multiple server-blocks however)")
exit()
new_config(user_config_path)
defnew_config(user_config_path:str):
click.echo("{} There was no config file found. Make sure it exists and is readable at either location:".format(click.style('Error:',fg='red',bold=True),click.style("Error:",fg='red',bold=True)))
print(" [0] {}".format(SERVER_PROPERTIES_FILE))
print(" [1] {}".format(user_config_path))
print()
print("For now the file just needs to contain three lines:")
forlineinEXAMPLE_CONFIG.splitlines():
click.echo(click.style((line),fg="bright_black"))
print()
ifclick.confirm(click.style('Do you want to create a config file at {}?'.format(user_config_path),fg="green"),abort=True):
# Create all directories in the path to the config, if they don't exist yet