mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
Move printing to stdout up to the command itself
Signed-off-by: Andy Caldwell <andrew.caldwell@metaswitch.com>
This commit is contained in:
@ -54,7 +54,6 @@ type Options struct {
|
||||
BuildArgs map[string]string
|
||||
Pull bool
|
||||
ImageIDFile string
|
||||
Quiet bool
|
||||
ExtraHosts []string
|
||||
NetworkMode string
|
||||
|
||||
@ -685,9 +684,6 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, do
|
||||
respMu.Unlock()
|
||||
if len(res) == 1 {
|
||||
digest := res[0].ExporterResponse["containerimage.digest"]
|
||||
if opt.Quiet {
|
||||
fmt.Println(digest)
|
||||
}
|
||||
if opt.ImageIDFile != "" {
|
||||
return ioutil.WriteFile(opt.ImageIDFile, []byte(digest), 0644)
|
||||
}
|
||||
@ -718,9 +714,6 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, do
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if opt.Quiet {
|
||||
fmt.Println(desc.Digest)
|
||||
}
|
||||
if opt.ImageIDFile != "" {
|
||||
return ioutil.WriteFile(opt.ImageIDFile, []byte(desc.Digest), 0644)
|
||||
}
|
||||
|
Reference in New Issue
Block a user