From e5b3ed1461d753c8f5d5f500eeb2a2bb2e775cee Mon Sep 17 00:00:00 2001 From: Stef Date: Sun, 26 Oct 2025 12:57:59 +0100 Subject: [PATCH] feat(typst): add typst step (#1374) --- src/step.rs | 3 +++ src/steps/generic.rs | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/src/step.rs b/src/step.rs index 9448207f..f994db86 100644 --- a/src/step.rs +++ b/src/step.rs @@ -149,6 +149,7 @@ pub enum Step { Tlmgr, Tmux, Toolbx, + Typst, Uv, Vagrant, Vcpkg, @@ -615,6 +616,7 @@ impl Step { #[cfg(target_os = "linux")] runner.execute(*self, "toolbx", || toolbx::run_toolbx(ctx))? } + Typst => runner.execute(*self, "Typst", || generic::run_typst(ctx))?, Uv => runner.execute(*self, "uv", || generic::run_uv(ctx))?, Vagrant => { if ctx.config().should_run(Vagrant) { @@ -877,6 +879,7 @@ pub(crate) fn default_steps() -> Vec { Powershell, CustomCommands, Vagrant, + Typst, ]); steps.shrink_to_fit(); diff --git a/src/steps/generic.rs b/src/steps/generic.rs index c6c02def..aecf11c3 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -1751,3 +1751,11 @@ pub fn run_yazi(ctx: &ExecutionContext) -> Result<()> { ctx.execute(ya).args(["pkg", "upgrade"]).status_checked() } + +pub fn run_typst(ctx: &ExecutionContext) -> Result<()> { + let typst = require("typst")?; + + print_separator("Typst"); + + ctx.execute(typst).args(["update"]).status_checked() +}