Skip to content

Commit 3c44777

Browse files
authored
fix: if profile ends with .toml, don't append it once more (#1687)
1 parent ac71c8f commit 3c44777

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/config.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ impl RusticConfig {
117117
merge_logs: &mut Vec<(Level, String)>,
118118
level_missing: Level,
119119
) -> Result<(), FrameworkError> {
120-
let profile_filename = profile.to_string() + ".toml";
120+
let profile_filename = if profile.ends_with(".toml") {
121+
profile.to_string()
122+
} else {
123+
profile.to_string() + ".toml"
124+
};
121125
let paths = get_config_paths(&profile_filename);
122126

123127
if let Some(path) = paths.iter().find(|path| path.exists()) {

0 commit comments

Comments
 (0)