summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-12-04 18:42:59 +0100
committerGitHub <noreply@github.com>2024-12-04 17:42:59 +0000
commit4f3ba7f8caecc49ae1051f0a0c217a44d3fda876 (patch)
treefbcd75bc44bae79cbdb3984c11c10cde502f846e /crates
parent60f1d8f9b5f7c11eade2573eea39cfd656509eed (diff)
Rename `--feature` to `--features` and support `TYPST_FEATURES` env var (#5523)
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-cli/src/args.rs4
-rw-r--r--crates/typst-cli/src/world.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-cli/src/args.rs b/crates/typst-cli/src/args.rs
index 7faaf601..33fcb9fd 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<Feature>,
+ #[arg(long = "features", value_delimiter = ',', env = "TYPST_FEATURES")]
+ pub features: Vec<Feature>,
/// 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 e5e31a90..c39358b9 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,