Check that an output format is available before compiling (#5080)

This commit is contained in:
emilylime 2024-10-01 12:26:12 +03:00 committed by GitHub
parent a0093ad8a7
commit f0ada7ba0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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))??;