diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-09 16:42:50 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-09 17:13:35 +0800 |
| commit | 10bc4ca7a4b3f14cfb57bf72a6da8aaa1490acf3 (patch) | |
| tree | 8b985dad38cfcd4c88af962b3e163131b258a381 /mingling_core/src/program/config.rs | |
| parent | 89b5132b8c17b6eba45b1bd49aa18b0c02016387 (diff) | |
Add lifecycle hooks to program execution
Diffstat (limited to 'mingling_core/src/program/config.rs')
| -rw-r--r-- | mingling_core/src/program/config.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mingling_core/src/program/config.rs b/mingling_core/src/program/config.rs index ac541fd..35b9392 100644 --- a/mingling_core/src/program/config.rs +++ b/mingling_core/src/program/config.rs @@ -35,13 +35,26 @@ impl Default for ProgramStdoutSetting { } /// Program user context -#[derive(Debug, Clone, Default)] +#[derive(Debug, Clone)] pub struct ProgramUserContext { /// View help information instead of running the command pub help: bool, /// Skip user confirmation step pub confirm: bool, + + /// Execute hooks during the program lifecycle + pub run_hook: bool, +} + +impl Default for ProgramUserContext { + fn default() -> Self { + Self { + help: false, + confirm: false, + run_hook: true, + } + } } #[cfg(feature = "general_renderer")] |
