cmd/input: list filters out \\n

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-05-31 15:21:39 +02:00
parent ba5078ef26
commit 91c2acd564

View File

@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"strings"
"text/tabwriter"
"go.dagger.io/dagger/client"
@ -65,6 +66,8 @@ var listCmd = &cobra.Command{
valStr = fmt.Sprintf("%s (default)", valStr)
}
valStr = strings.ReplaceAll(valStr, "\n", "\\n")
if !viper.GetBool("all") {
// skip input that is not overridable
if !hasDefault && isConcrete {