From a4ec693e3471f87aea89bc4c8132330b0fde3a9f Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Thu, 9 Oct 2025 19:00:16 -0400 Subject: [PATCH] windows: Don't throw an error when the settings file is empty (#39908) Closes #39585 Release Notes: - N/A --- crates/migrator/src/migrator.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/migrator/src/migrator.rs b/crates/migrator/src/migrator.rs index a493b1efbe052cdfc3a9e3e3f396780ad7fd2cd8..dbf7605e1db3d56fbf3347e95b53c42f3abc081a 100644 --- a/crates/migrator/src/migrator.rs +++ b/crates/migrator/src/migrator.rs @@ -78,6 +78,9 @@ fn run_migrations(text: &str, migrations: &[MigrationType]) -> Result migrate(¤t_text, patterns, query)?, MigrationType::Json(callback) => { + if current_text.trim().is_empty() { + return Ok(None); + } let old_content: serde_json_lenient::Value = settings::parse_json_with_comments(¤t_text)?; let old_value = serde_json::to_value(&old_content).unwrap();