fix: -o/--outputfile with a .json or .sql extension now selects those formats
This commit is contained in:
parent
f2026aec5a
commit
606d99834a
@ -639,8 +639,10 @@ outputFileFromOpts opts = do
|
||||
defaultOutputFormat :: String
|
||||
defaultOutputFormat = "txt"
|
||||
|
||||
-- | All the output formats known by any command, for outputFormatFromOpts.
|
||||
-- To automatically infer it from -o/--output-file, it needs to be listed here.
|
||||
outputFormats :: [String]
|
||||
outputFormats = [defaultOutputFormat, "csv", "tsv", "html"]
|
||||
outputFormats = [defaultOutputFormat, "csv", "json", "html", "sql", "tsv"]
|
||||
|
||||
-- | Get the output format from the --output-format option,
|
||||
-- otherwise from a recognised file extension in the --output-file option,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user