Don't error on nonexistent TOML imports in migrate

YAML import migration was already properly ignoring nonexistent imports,
it was only missed for TOML ones.

Fixes #8330.
This commit is contained in:
Kirill Chibisov authored and Christian Duerr committed 2024-12-22 23:22:32 +00:00
1 parent 21657d2d4b
commit bf77ac5218
2 files changed
+9

No files matched your search

+1
View File
@@ -16,6 +16,7 @@ Notable changes to the `alacritty_terminal` crate are documented in its
- Hint launcher opening arbitrary text, when terminal content changed while opening
- `SemanticRight`/`SemanticLeft` vi motions breaking with wide semantic escape characters
- `alacritty migrate` crashing with recursive toml imports
- Migrating nonexistent toml import breaking the entire migration
## 0.14.0
+8
View File
@@ -151,6 +151,14 @@ fn migrate_imports(
// Migrate each import.
for import in imports.into_iter().filter_map(|item| item.as_str()) {
let normalized_path = config::normalize_import(path, import);
if !normalized_path.exists() {
if options.dry_run {
println!("Skipping migration for nonexistent path: {}", normalized_path.display());
}
continue;
}
let migration = migrate_config(options, &normalized_path, recursion_limit - 1)?;
if options.dry_run {
println!("{}", migration.success_message(true));