Skip to content

Commit

Permalink
fix(config): allow environment overwrites when using builtin config (#…
Browse files Browse the repository at this point in the history
…961)

* fix: allow environment overwrites when using built-in configurations

* refactor(embed): simplify config parsing

---------

Co-authored-by: Orhun Parmaksız <[email protected]>
  • Loading branch information
weichweich and orhun authored Jan 22, 2025
1 parent 1b779a6 commit 7ba3b55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-cliff-core/src/embed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ impl BuiltinConfig {
///
/// [`Config`]: Config
pub fn parse(name: String) -> Result<(Config, String)> {
Ok((toml::from_str(&Self::get_config(name.to_string())?)?, name))
let raw_config = Self::get_config(name.to_string())?;
let parsed = Config::parse_from_str(&raw_config)?;
Ok((parsed, name))
}
}

0 comments on commit 7ba3b55

Please sign in to comment.