Skip to content

Commit

Permalink
only override the output format for non terminals when --output isn't…
Browse files Browse the repository at this point in the history
… specified
  • Loading branch information
kylegalbraith committed Dec 19, 2023
1 parent cd87be6 commit 71afad6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/list/builds.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewCmdBuilds() *cobra.Command {
}

client := api.NewBuildClient()
if !helpers.IsTerminal() {
if !helpers.IsTerminal() && outputFormat == "" {
outputFormat = "csv"
}
if outputFormat != "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/list/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func NewCmdProjects() *cobra.Command {
)

projectClient := api.NewProjectsClient()
if !helpers.IsTerminal() {
if !helpers.IsTerminal() && outputFormat == "" {
outputFormat = "csv"
}
if outputFormat != "" {
Expand Down

0 comments on commit 71afad6

Please sign in to comment.