From 1b3db2c8ad0712179112bf9ba8ba79809674cfc3 Mon Sep 17 00:00:00 2001 From: gsell Date: Wed, 19 Feb 2025 10:38:34 +0100 Subject: [PATCH] Merge branch '390-build-system-add-check-that-a-dependency-load-successfully' into 'master' Resolve "build-system: add check that a dependency load successfully." Closes #390 See merge request Pmodules/src!419 (cherry picked from commit d003e91e1b88f21d2b47f6a1bbdc6f3fdae7accd) 963467ea build-system: add check that a dependency was successfully loaded Co-authored-by: gsell --- Pmodules/libpbuild.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index abd8dd2..e6249c1 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -1042,6 +1042,12 @@ _build_module() { std::info "Loading module: ${m}" eval "$( "${modulecmd}" bash load "${m}" )" + if ! bm::is_loaded "$m"; then + "${modulecmd}" bash list + std::die 5 \ + "%s " "${m}:" \ + "module cannot be loaded!" + fi done } # bm::load_build_dependencies