mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-24 11:25:56 +00:00
A failed module build is an error, never an old package installed in its place
install_module_sources ignored BuildResult.success, so a failing build (for example a CMake error) installed the package an earlier build had left and reported success. Found while checking the Update button. The dev mock also shows an available update. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e8bf35f95d
commit
64bfe33778
2 files changed
+7
-2
No files matched your search
@@ -361,6 +361,10 @@ fn install_module_sources(realm_root: &Path, m: &RecommendedModule, update: bool
|
||||
bundled.push(dir);
|
||||
}
|
||||
let built = build_engine::build_module_with_bundle(&primary, &bundled, realm_root, None, None).map_err(|e| e.to_string())?;
|
||||
if !built.success {
|
||||
// Never install a package left by an earlier build: it was made from other sources.
|
||||
return Err(build_failure_reason(&built.errors));
|
||||
}
|
||||
if built.module_id != m.id {
|
||||
return Err(format!("the sources build module '{}', not '{}'", built.module_id, m.id));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user