mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
Added warning for auto-input json files
This commit is contained in:
parent
7103b78d38
commit
aebdbb4113
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user