mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
Add TOML migration recommendation to warning
This adds a little recommendation to use `alacritty migrate` to automatically transition configuration files from YAML to TOML.
This commit is contained in:
parent
43b7c1774c
commit
9fcdb059bf
1 changed files with 3 additions and 1 deletions
|
@ -228,7 +228,9 @@ pub fn deserialize_config(path: &Path) -> Result<Value> {
|
|||
// Convert YAML to TOML as a transitionary fallback mechanism.
|
||||
let extension = path.extension().unwrap_or_default();
|
||||
if (extension == "yaml" || extension == "yml") && !contents.trim().is_empty() {
|
||||
warn!("YAML config {path:?} is deprecated, please migrate to TOML");
|
||||
warn!(
|
||||
"YAML config {path:?} is deprecated, please migrate to TOML using `alacritty migrate`"
|
||||
);
|
||||
|
||||
let value: serde_yaml::Value = serde_yaml::from_str(&contents)?;
|
||||
contents = toml::to_string(&value)?;
|
||||
|
|
Loading…
Reference in a new issue