summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-03-11 13:36:27 +0100
committerMatthias Beyer <matthias.beyer@atos.net>2021-03-11 13:36:27 +0100
commit040b19ea29212375d5cb308791bacd77f27ab3b9 (patch)
tree74c53b23a5f5fbf937a20198bab4e3d57af6ebe5
parentc5557bf6ea8f4f9c81fe30c6518f7784da777865 (diff)
Fix: Make XDG configuration not required
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index ea06a7c..45f587f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -102,7 +102,7 @@ async fn main() -> Result<()> {
.ok_or_else(|| anyhow!("Not a repository with working directory. Cannot do my job!"))?;
let mut config = ::config::Config::default();
- config.merge(::config::File::from(repo_path.join("config.toml")))
+ config.merge(::config::File::from(repo_path.join("config.toml")).required(true))
.context("Failed to load config.toml from repository")?;
{
@@ -110,7 +110,7 @@ async fn main() -> Result<()> {
let xdg_config_file = xdg.find_config_file("config.toml");
if let Some(xdg_config) = xdg_config_file {
debug!("Configuration file found with XDG: {}", xdg_config.display());
- config.merge(::config::File::from(xdg_config))
+ config.merge(::config::File::from(xdg_config).required(false))
.context("Failed to load config.toml from XDG configuration directory")?;
} else {
debug!("No configuration file found with XDG: {}", xdg.get_config_home().display());