Skip to content

Commit

Permalink
Added warning for auto-input json files
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefarah committed Mar 26, 2023
1 parent 7103b78 commit aebdbb4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ func initCommand(cmd *cobra.Command, args []string) (string, []string, error) {
if inputFormat == "toml" {
return "", nil, fmt.Errorf("toml is not yet supported as an output format. Please specify another output format using the [--output-format/-o] flag")
}
if inputFormat == "json" {
yqlib.GetLogger().Warning("JSON file output is now JSON by default (instead of yaml). Use '-oy' or '--output-format=yaml' for yaml output")
}
outputFormat = inputFormat
}
} else if isAutomaticOutputFormat() {
Expand Down

0 comments on commit aebdbb4

Please sign in to comment.