mirror of
https://github.com/mudler/luet.git
synced 2025-09-16 15:19:24 +00:00
backend: Add realtime output on building phase
The realtime output could be configured through LUET_GENERAL__SHOW_BUILD_OUTPUT environment variable or related config option or through `--live-output` option.
This commit is contained in:
@@ -44,17 +44,17 @@ func (*SimpleImg) BuildImage(opts compiler.CompilerBackendOptions) error {
|
||||
dockerfileName := opts.DockerFileName
|
||||
|
||||
buildarg := []string{"build", "-f", dockerfileName, "-t", name, context}
|
||||
Spinner(22)
|
||||
defer SpinnerStop()
|
||||
|
||||
Info(":tea: Building image " + name)
|
||||
cmd := exec.Command("img", buildarg...)
|
||||
cmd.Dir = path
|
||||
out, err := cmd.CombinedOutput()
|
||||
|
||||
_, err := runCommand(cmd)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Failed building image: "+string(out))
|
||||
return err
|
||||
}
|
||||
|
||||
Info(":tea: Building image " + name + " done")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user