From 3e7a55be94f948cee26b5abece4641fc99c9e8f7 Mon Sep 17 00:00:00 2001 From: MK Date: Sun, 21 Sep 2025 20:54:40 +0800 Subject: [PATCH] fix(cli): add missing lib command --- packages/cli/binding/src/lib.rs | 3 ++- packages/global/snap-tests/cli-helper-message/snap.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cli/binding/src/lib.rs b/packages/cli/binding/src/lib.rs index 8948c43c07..59fa957b36 100644 --- a/packages/cli/binding/src/lib.rs +++ b/packages/cli/binding/src/lib.rs @@ -75,7 +75,7 @@ impl From for ResolveCommandResult { } } -static BUILTIN_COMMANDS: &[&str] = &["lint", "fmt", "build", "test", "doc"]; +static BUILTIN_COMMANDS: &[&str] = &["lint", "fmt", "build", "test", "doc", "lib"]; /// Main entry point for the CLI, called from JavaScript. /// @@ -270,6 +270,7 @@ fn parse_args() -> Args { "build" => Commands::Build { args: forwarded_args }, "test" => Commands::Test { args: forwarded_args }, "doc" => Commands::Doc { args: forwarded_args }, + "lib" => Commands::Lib { args: forwarded_args }, _ => unreachable!(), }, debug: false, diff --git a/packages/global/snap-tests/cli-helper-message/snap.txt b/packages/global/snap-tests/cli-helper-message/snap.txt index 6f40246ec9..50ab0019e6 100644 --- a/packages/global/snap-tests/cli-helper-message/snap.txt +++ b/packages/global/snap-tests/cli-helper-message/snap.txt @@ -10,7 +10,7 @@ Commands: lib Lib command, build a library install Install command. It will be passed to the package manager's install command currently dev - doc Doc command, build a documentation + doc Doc command, build documentation cache Manage the task cache help Print this message or the help of the given subcommand(s)