Update the guidance in the error message if config is not set

This commit is contained in:
sabaimran 2023-07-01 19:09:00 -07:00
parent 7db97d8aa9
commit a71440f62a

View file

@ -34,11 +34,13 @@ logger = logging.getLogger(__name__)
def configure_server(args, required=False):
if args.config is None:
if required:
logger.error(f"Exiting as Khoj is not configured.\nConfigure it via GUI or by editing {state.config_file}.")
logger.error(
f"Exiting as Khoj is not configured.\nConfigure it via http://localhost:8000/config or by editing {state.config_file}."
)
sys.exit(1)
else:
logger.warning(
f"Khoj is not configured.\nConfigure it via khoj GUI, plugins or by editing {state.config_file}."
f"Khoj is not configured.\nConfigure it via http://localhost:8000/config, plugins or by editing {state.config_file}."
)
return
else: