From 5f38d18aed20d8d3ab2a337a499f79cc53dd4c9d Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Mon, 15 Aug 2022 21:56:38 -0700 Subject: [PATCH] dockerfile: fix writing to wrong writer for outline response These newlines accidentally go to stdio. If this happens at the wrong time it blocks grpc. Signed-off-by: Tonis Tiigi --- frontend/subrequests/outline/outline.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/subrequests/outline/outline.go b/frontend/subrequests/outline/outline.go index 3050dc4b1376..c0a376b0f94a 100644 --- a/frontend/subrequests/outline/outline.go +++ b/frontend/subrequests/outline/outline.go @@ -101,7 +101,7 @@ func PrintOutline(dt []byte, w io.Writer) error { fmt.Fprintf(tw, "DESCRIPTION:\t%s\n", o.Description) } tw.Flush() - fmt.Println() + fmt.Fprintln(tw) } if len(o.Args) > 0 { @@ -111,7 +111,7 @@ func PrintOutline(dt []byte, w io.Writer) error { fmt.Fprintf(tw, "%s\t%s\t%s\n", a.Name, a.Value, a.Description) } tw.Flush() - fmt.Println() + fmt.Fprintln(tw) } if len(o.Secrets) > 0 { @@ -125,7 +125,7 @@ func PrintOutline(dt []byte, w io.Writer) error { fmt.Fprintf(tw, "%s\t%s\n", s.Name, b) } tw.Flush() - fmt.Println() + fmt.Fprintln(tw) } if len(o.SSH) > 0 { @@ -139,7 +139,7 @@ func PrintOutline(dt []byte, w io.Writer) error { fmt.Fprintf(tw, "%s\t%s\n", s.Name, b) } tw.Flush() - fmt.Println() + fmt.Fprintln(tw) } return nil