diff --git a/pkg/cmd/list/builds.go b/pkg/cmd/list/builds.go index f70092b5..7fc88752 100644 --- a/pkg/cmd/list/builds.go +++ b/pkg/cmd/list/builds.go @@ -40,6 +40,9 @@ func NewCmdBuilds() *cobra.Command { } client := api.NewBuildClient() + if !helpers.IsTerminal() { + outputFormat = "csv" + } if outputFormat != "" { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() diff --git a/pkg/cmd/list/projects.go b/pkg/cmd/list/projects.go index e8240479..8b689192 100644 --- a/pkg/cmd/list/projects.go +++ b/pkg/cmd/list/projects.go @@ -65,6 +65,9 @@ func NewCmdProjects() *cobra.Command { ) projectClient := api.NewProjectsClient() + if !helpers.IsTerminal() { + outputFormat = "csv" + } if outputFormat != "" { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel()