mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Check that an output format is available before compiling (#5080)
This commit is contained in:
parent
a0093ad8a7
commit
f0ada7ba0c
@ -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))??;
|
||||
|
Loading…
x
Reference in New Issue
Block a user