Don't read sources until in/out format are verified.
Partially addresses #7797.
This commit is contained in:
parent
811eee7cad
commit
75c5218d4f
1 changed files with 3 additions and 2 deletions
|
@ -116,8 +116,6 @@ convertWithOpts opts = do
|
|||
setInputFiles (fromMaybe ["-"] (optInputFiles opts))
|
||||
setOutputFile (optOutputFile opts)
|
||||
|
||||
inputs <- readSources sources
|
||||
|
||||
-- assign reader and writer based on options and filenames
|
||||
readerName <- case optFrom opts of
|
||||
Just f -> return f
|
||||
|
@ -282,6 +280,9 @@ convertWithOpts opts = do
|
|||
(optCitationAbbreviations opts) $ mempty
|
||||
|
||||
let filterEnv = Environment readerOpts writerOptions
|
||||
|
||||
inputs <- readSources sources
|
||||
|
||||
doc <- (case reader of
|
||||
TextReader r
|
||||
| readerNameBase == "json" ->
|
||||
|
|
Loading…
Add table
Reference in a new issue