diff --git a/kernel.go b/kernel.go index fafa25e..0c59bf9 100644 --- a/kernel.go +++ b/kernel.go @@ -98,7 +98,7 @@ func (cmd *KernelDockerRegenCmd) Run(kernelCmd *KernelCmd, g *Globals) (err erro args := []string{"build"} _, err = exec.Command("which", "podman").CombinedOutput() - if err != nil { + if err == nil { args = append(args, "--squash-all") } args = append(args, "-t", d.ContainerName, imagePath) @@ -354,7 +354,7 @@ func generateBaseDockerImage(registry string, commands []config.DockerCommand, args := []string{"build"} _, err = exec.Command("which", "podman").CombinedOutput() - if err != nil { + if err == nil { args = append(args, "--squash-all") } args = append(args, "-t", sk.DockerName(), imagePath) @@ -428,7 +428,7 @@ func dockerImageAppend(sk config.KernelMask, pkgname string) (err error) { args := []string{"build"} _, err = exec.Command("which", "podman").CombinedOutput() - if err != nil { + if err == nil { args = append(args, "--squash-all") } args = append(args, "-t", sk.DockerName(), imagePath)