fix: allow empty custom modules dir (#77)
Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
This commit is contained in:
parent
8931a22e29
commit
681aab4a85
2 changed files with 7 additions and 0 deletions
|
|
@ -224,6 +224,11 @@ fn get_gitlab_registry_path() -> Option<String> {
|
|||
)
|
||||
}
|
||||
|
||||
fn modules_exists() -> bool {
|
||||
let mod_path = Path::new("modules");
|
||||
mod_path.exists() && mod_path.is_dir()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, TypedBuilder, PartialEq, Eq, Hash)]
|
||||
struct AkmodsInfo {
|
||||
images: (String, Option<String>),
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ COPY ./config /config
|
|||
# Custom modules overwrite defaults
|
||||
FROM scratch as stage-modules
|
||||
COPY --from=ghcr.io/ublue-os/bling:latest /modules /modules
|
||||
{%- if self::modules_exists() %}
|
||||
COPY ./modules /modules
|
||||
{%- endif %}
|
||||
|
||||
{%- for info in self::get_akmods_info_list(recipe.modules_ext, os_version) %}
|
||||
FROM scratch as stage-akmods-{{ info.stage_name }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue