From 2c7a8ff45ea1f33c364899007ff40e4083850b10 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 16 Jul 2026 04:04:20 +0100 Subject: [PATCH] Initialize exact release submodule bodies --- epiphany-core/src/packaged_release.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/epiphany-core/src/packaged_release.rs b/epiphany-core/src/packaged_release.rs index 41dd2f14..ac301531 100644 --- a/epiphany-core/src/packaged_release.rs +++ b/epiphany-core/src/packaged_release.rs @@ -228,10 +228,28 @@ impl GitWorktreeGuard { String::from_utf8_lossy(&output.stderr) ); } - Ok(Self { + let guard = Self { repo: repo.to_path_buf(), path: path.to_path_buf(), - }) + }; + let submodules = std::process::Command::new("git") + .args([ + "-c", + "core.longpaths=true", + "submodule", + "update", + "--init", + "--recursive", + ]) + .current_dir(&guard.path) + .output()?; + if !submodules.status.success() { + bail!( + "failed to initialize exact release submodules: {}", + String::from_utf8_lossy(&submodules.stderr) + ); + } + Ok(guard) } }