diff options
| author | emilylime <emilyyyylime+git@gmail.com> | 2024-10-01 12:26:12 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-01 09:26:12 +0000 |
| commit | f0ada7ba0c9009c113e34960bc8e7b3f3124476e (patch) | |
| tree | 0d3cd0147f9fcf02b7a64cf5943ecc88475f648c /crates/typst-cli | |
| parent | a0093ad8a7906068b4bd641c28f614804d3e099d (diff) | |
Check that an output format is available before compiling (#5080)
Diffstat (limited to 'crates/typst-cli')
| -rw-r--r-- | crates/typst-cli/src/compile.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/typst-cli/src/compile.rs b/crates/typst-cli/src/compile.rs index b1786941..74d818a5 100644 --- a/crates/typst-cli/src/compile.rs +++ b/crates/typst-cli/src/compile.rs @@ -96,6 +96,9 @@ impl CompileCommand { /// Execute a compilation command. pub fn compile(mut timer: Timer, mut command: CompileCommand) -> StrResult<()> { + // Only meant for input validation + _ = command.output_format()?; + let mut world = SystemWorld::new(&command.common).map_err(|err| eco_format!("{err}"))?; timer.record(&mut world, |world| compile_once(world, &mut command, false))??; |
