Skip to content

Commit

Permalink
crate confy: specify path to config
Browse files Browse the repository at this point in the history
Solves:
[Expose config path · Issue #33 · rust-cli/confy](rust-cli/confy#33)
  • Loading branch information
Jens Getreu committed Jun 24, 2021
1 parent e484ba4 commit e556b6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -910,11 +910,11 @@ lazy_static! {
/// Reads and parses the configuration file "tp-note.toml". An alternative
/// filename (optionally with absolute path) can be given on the command line
/// with "--config".
pub static ref CFG: Cfg = confy::load::<Cfg>(PathBuf::from(
pub static ref CFG: Cfg = confy::load_path::<Cfg>(PathBuf::from(
if let Some(c) = &ARGS.config {
c
} else {
CURRENT_EXE
CONFIG_PATH
})
// strip extension, ".toml" is added by `confy.load()`
.with_extension("")
Expand Down

0 comments on commit e556b6d

Please sign in to comment.