aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2023-06-26 00:07:41 +0200
committerGitHub <noreply@github.com>2023-06-26 02:07:41 +0400
commit9fcdb059bf772303e66607ccbf6f1fd6183743e9 (patch)
tree7e4bb90d80208bd04b85545f5b9533d0f4c9177b
parent43b7c1774c62e06e5a16561dc779d27ef9ad6a6f (diff)
downloadalacritty-9fcdb059bf772303e66607ccbf6f1fd6183743e9.tar.gz
alacritty-9fcdb059bf772303e66607ccbf6f1fd6183743e9.zip
Add TOML migration recommendation to warning
This adds a little recommendation to use `alacritty migrate` to automatically transition configuration files from YAML to TOML.
-rw-r--r--alacritty/src/config/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs
index 821e9b6b..87ca0716 100644
--- a/alacritty/src/config/mod.rs
+++ b/alacritty/src/config/mod.rs
@@ -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)?;