Skip to content

Commit

Permalink
fix(config): use correct config file path
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenclaw900 committed Apr 2, 2022
1 parent 52f8e16 commit f08fabe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ impl Default for Config {
}

pub fn config() -> Config {
let mut cfgpath = std::env::current_exe().expect("Couldn't get config path");
cfgpath.set_file_name("config.toml");
Figment::from(Serialized::defaults(Config::default()))
.merge(Toml::file("config.toml"))
.merge(Toml::file(cfgpath))
.merge(Env::prefixed("DP_DASHBOARD_").ignore(&["hash", "secret"]))
.extract()
.expect("Error reading config")
Expand Down

0 comments on commit f08fabe

Please sign in to comment.