From 4f3ba7f8caecc49ae1051f0a0c217a44d3fda876 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 4 Dec 2024 18:42:59 +0100 Subject: [PATCH] Rename `--feature` to `--features` and support `TYPST_FEATURES` env var (#5523) --- crates/typst-cli/src/args.rs | 4 ++-- crates/typst-cli/src/world.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/typst-cli/src/args.rs b/crates/typst-cli/src/args.rs index 7faaf6017..33fcb9fd8 100644 --- a/crates/typst-cli/src/args.rs +++ b/crates/typst-cli/src/args.rs @@ -315,8 +315,8 @@ pub struct ProcessArgs { /// Enables in-development features that may be changed or removed at any /// time. - #[arg(long = "feature", value_delimiter = ',')] - pub feature: Vec, + #[arg(long = "features", value_delimiter = ',', env = "TYPST_FEATURES")] + pub features: Vec, /// The format to emit diagnostics in. #[clap(long, default_value_t)] diff --git a/crates/typst-cli/src/world.rs b/crates/typst-cli/src/world.rs index e5e31a902..c39358b9c 100644 --- a/crates/typst-cli/src/world.rs +++ b/crates/typst-cli/src/world.rs @@ -117,7 +117,7 @@ impl SystemWorld { .collect(); let features = process_args - .feature + .features .iter() .map(|&feature| match feature { Feature::Html => typst::Feature::Html,