Skip to content

Commit

Permalink
use exitwithjson instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jrschumacher committed Aug 29, 2024
1 parent fd90f3f commit 9587b29
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ func getMetadataUpdateBehavior() common.MetadataUpdateEnum {
func HandleSuccess(command *cobra.Command, id string, t table.Model, policyObject interface{}) {
c := cli.New(command, []string{})
if OtdfctlCfg.Output.Format == config.OutputJSON || configFlagOverrides.OutputFormatJSON {
c.PrintJson(policyObject)
return
c.ExitWithJson(policyObject)
}
cli.PrintSuccessTable(command, id, t)
}
Expand Down

0 comments on commit 9587b29

Please sign in to comment.