Skip to content

Commit aebdbb4

Browse files
committed
Added warning for auto-input json files
1 parent 7103b78 commit aebdbb4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ func initCommand(cmd *cobra.Command, args []string) (string, []string, error) {
7878
if inputFormat == "toml" {
7979
return "", nil, fmt.Errorf("toml is not yet supported as an output format. Please specify another output format using the [--output-format/-o] flag")
8080
}
81+
if inputFormat == "json" {
82+
yqlib.GetLogger().Warning("JSON file output is now JSON by default (instead of yaml). Use '-oy' or '--output-format=yaml' for yaml output")
83+
}
8184
outputFormat = inputFormat
8285
}
8386
} else if isAutomaticOutputFormat() {

0 commit comments

Comments
 (0)