mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 00:54:51 +08:00
Use file extension to auto detect output format!
This commit is contained in:
+1
-2
@@ -70,8 +70,7 @@ func initCommand(cmd *cobra.Command, args []string) (string, []string, error) {
|
||||
//
|
||||
outputFormat = yqlib.FormatFromFilename(inputFilename)
|
||||
if inputFilename != "-" {
|
||||
yqlib.GetLogger().Warning("yq default output is now 'auto' (based on the filename extension)")
|
||||
yqlib.GetLogger().Warning("For backwards compatibility 'yaml' has been set as the output format. Please use -oy to specify yaml, or drop the -p flag.", outputFormat)
|
||||
yqlib.GetLogger().Warning("yq default output is now 'auto' (based on the filename extension). Normally yq would output '%v', but for backwards compatibility 'yaml' has been set. Please use -oy to specify yaml, or drop the -p flag.", outputFormat)
|
||||
}
|
||||
outputFormat = "yaml"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user