diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-12-04 14:17:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-04 13:17:38 +0000 |
| commit | bf1c7db6fcee967ea802a19430c1e27444e16da1 (patch) | |
| tree | 17e9228d3844fa964e88ee88f6fa4b8a2ca9a3c1 /crates/typst-cli/src/query.rs | |
| parent | 884c02872ce9d7432c3b67a920011cf385ce70b2 (diff) | |
Clean up CLI argument parsing (#5521)
Diffstat (limited to 'crates/typst-cli/src/query.rs')
| -rw-r--r-- | crates/typst-cli/src/query.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-cli/src/query.rs b/crates/typst-cli/src/query.rs index 947a6485..610f23cd 100644 --- a/crates/typst-cli/src/query.rs +++ b/crates/typst-cli/src/query.rs @@ -15,7 +15,7 @@ use crate::world::SystemWorld; /// Execute a query command. pub fn query(command: &QueryCommand) -> HintedStrResult<()> { - let mut world = SystemWorld::new(&command.common)?; + let mut world = SystemWorld::new(&command.input, &command.world, &command.process)?; // Reset everything and ensure that the main file is present. world.reset(); @@ -29,7 +29,7 @@ pub fn query(command: &QueryCommand) -> HintedStrResult<()> { let data = retrieve(&world, command, &document)?; let serialized = format(data, command)?; println!("{serialized}"); - print_diagnostics(&world, &[], &warnings, command.common.diagnostic_format) + print_diagnostics(&world, &[], &warnings, command.process.diagnostic_format) .map_err(|err| eco_format!("failed to print diagnostics ({err})"))?; } @@ -40,7 +40,7 @@ pub fn query(command: &QueryCommand) -> HintedStrResult<()> { &world, &errors, &warnings, - command.common.diagnostic_format, + command.process.diagnostic_format, ) .map_err(|err| eco_format!("failed to print diagnostics ({err})"))?; } |
