diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-18 15:46:38 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-18 15:46:38 +0800 |
| commit | f1408931eb19f90dd96092ea26bea8d14f5ec804 (patch) | |
| tree | 19daeb4df4742c91e83b843a83dea54e7170f7f1 /mingling_core/src/program.rs | |
| parent | 8840529533a6bb49439a1f7eb9f93c117f20b9f7 (diff) | |
Move hook execution into the async and sync run methods
Diffstat (limited to 'mingling_core/src/program.rs')
| -rw-r--r-- | mingling_core/src/program.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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, |
