1
0

Add debug logs for exec.Command

Esse commit está contido em:
2023-03-19 13:14:14 +00:00
commit 08beba2bab
6 arquivos alterados com 53 adições e 2 exclusões

Ver arquivo

@ -17,6 +17,7 @@ import (
"code.dumpstack.io/tools/out-of-tree/config"
"code.dumpstack.io/tools/out-of-tree/qemu"
"github.com/rs/zerolog/log"
)
type ImageCmd struct {
@ -146,6 +147,8 @@ func unpackTar(archive, destination string) (err error) {
cmd := exec.Command("tar", "-Sxf", archive)
cmd.Dir = destination + "/"
log.Debug().Msgf("%v", cmd)
rawOutput, err := cmd.CombinedOutput()
if err != nil {
err = fmt.Errorf("%v: %s", err, rawOutput)