diff --git a/console/displayer.go b/console/displayer.go index bb9ec522e..a50193c5c 100644 --- a/console/displayer.go +++ b/console/displayer.go @@ -405,7 +405,11 @@ func (d *csvDisplayer) Print(w io.Writer) error { for i := range values { var props []string for j, h := range d.columnDefinitions { - props = append(props, h.format(values[i][j])) + val := h.format(values[i][j]) + if strings.Contains(val, ",") { + val = "\"" + val + "\"" + } + props = append(props, val) } buff.WriteString(strings.Join(props, ",") + "\n") }