From f1408931eb19f90dd96092ea26bea8d14f5ec804 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 18 May 2026 15:46:38 +0800 Subject: Move hook execution into the async and sync run methods --- mingling_core/src/program.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mingling_core/src/program.rs') diff --git a/mingling_core/src/program.rs b/mingling_core/src/program.rs index fbffb3d..7c667e4 100644 --- a/mingling_core/src/program.rs +++ b/mingling_core/src/program.rs @@ -220,6 +220,9 @@ where where C: 'static + Send + Sync, { + // Run hooks + self.run_hook_on_begin(); + self.args = self.args.iter().skip(1).cloned().collect(); match self .exec_wrapper(|p| async { crate::exec::exec(p).await.map_err(|e| e.into()) }) @@ -331,6 +334,9 @@ where where C: 'static + Send + Sync, { + // Run hooks + self.run_hook_on_begin(); + self.args = self.args.iter().skip(1).cloned().collect(); match self.exec_wrapper(|p| crate::exec::exec(p).map_err(|e| e.into())) { Ok(r) => r, -- cgit