From c839244d8d09f3036ebfee8eef7eb6b147e593ab Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 19 May 2026 00:10:22 +0900 Subject: fix(compile): fix various compile errors Co-Authored-By: Claude Sonnet 4.6 --- crates/shirabe/src/script/script_events.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crates/shirabe/src/script') diff --git a/crates/shirabe/src/script/script_events.rs b/crates/shirabe/src/script/script_events.rs index c3ec370..a802406 100644 --- a/crates/shirabe/src/script/script_events.rs +++ b/crates/shirabe/src/script/script_events.rs @@ -15,4 +15,22 @@ impl ScriptEvents { pub const POST_CREATE_PROJECT_CMD: &'static str = "post-create-project-cmd"; pub const PRE_ARCHIVE_CMD: &'static str = "pre-archive-cmd"; pub const POST_ARCHIVE_CMD: &'static str = "post-archive-cmd"; + + pub fn is_defined(const_name: &str) -> bool { + matches!( + const_name, + "PRE_INSTALL_CMD" + | "POST_INSTALL_CMD" + | "PRE_UPDATE_CMD" + | "POST_UPDATE_CMD" + | "PRE_STATUS_CMD" + | "POST_STATUS_CMD" + | "PRE_AUTOLOAD_DUMP" + | "POST_AUTOLOAD_DUMP" + | "POST_ROOT_PACKAGE_INSTALL" + | "POST_CREATE_PROJECT_CMD" + | "PRE_ARCHIVE_CMD" + | "POST_ARCHIVE_CMD" + ) + } } -- cgit v1.3.1