Commit bd5fcf9b by Brian Turek Committed by Bryce Drennan

Check to ensure the global config exists before reading (#1324)

Check to ensure the global config exists before reading
parent 4d87bba6
......@@ -73,7 +73,8 @@ To remove a repository (repo is a short alias for repositories):
config = Config()
config_file = TomlFile(Path(CONFIG_DIR) / "config.toml")
config_source = ConfigSource(config_file)
config.merge(config_source.file.read())
if config_source.file.exists():
config.merge(config_source.file.read())
auth_config_file = TomlFile(Path(CONFIG_DIR) / "auth.toml")
auth_config_source = ConfigSource(auth_config_file, auth_config=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment