had to cleanup a lot in relation to optional returns

This commit is contained in:
2025-01-01 13:40:24 +01:00
parent cffd5e2f9c
commit 914e1f5073
135 changed files with 4165 additions and 3530 deletions

View File

@@ -4,6 +4,8 @@ import freeflowuniverse.herolib.osal { cputype, exec, platform }
import freeflowuniverse.herolib.core.texttools
import freeflowuniverse.herolib.virt.utils
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.core
// import freeflowuniverse.herolib.installers.swarm
// https://docs.docker.com/reference/
@@ -36,9 +38,9 @@ pub fn (mut e DockerEngine) init() ! {
exec(cmd: 'mkdir -p ${e.buildpath}', stdout: false)!
}
if e.platform == [] {
if platform() == .ubuntu && cputype() == .intel {
if core.platform()! == .ubuntu && cputype()! == .intel {
e.platform = [.linux_amd64]
} else if platform() == .osx && cputype() == .arm {
} else if core.platform()! == .osx && cputype()! == .arm {
e.platform = [.linux_arm64]
} else {
return error('only implemented ubuntu on amd and osx on arm for now for docker engine.')