fix: -o/--outputfile with a .json or .sql extension now selects those formats

This commit is contained in:
Simon Michael 2023-11-22 19:25:37 -10:00
parent f2026aec5a
commit 606d99834a

View File

@ -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,