From 51c0acd5e024bf4945edd1a7ed3177a892f3326c Mon Sep 17 00:00:00 2001 From: blessme247 Date: Sun, 29 Mar 2026 12:25:54 +0100 Subject: [PATCH] feat: fix duplicate execution start banner emission --- src/cli/commands.rs | 8 ++++---- src/plugin/loader.rs | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/cli/commands.rs b/src/cli/commands.rs index e8d172df..9268d921 100644 --- a/src/cli/commands.rs +++ b/src/cli/commands.rs @@ -669,9 +669,9 @@ pub fn run(args: RunArgs, verbosity: Verbosity) -> Result<()> { } // Execute locally with debugging - if !args.is_json_output() { - println!("\n--- Execution Start ---\n"); - } + // if !args.is_json_output() { + // println!("\n--- Execution Start ---\n"); + // } if args.instruction_debug { print_info("Enabling instruction-level debugging..."); engine.enable_instruction_debug(&wasm_bytes)?; @@ -687,7 +687,7 @@ pub fn run(args: RunArgs, verbosity: Verbosity) -> Result<()> { return Ok(()); } } - + print_info("\n--- Execution Start ---\n"); output_writer.write("\n--- Execution Start ---\n")?; let storage_before = engine.executor().get_storage_snapshot()?; diff --git a/src/plugin/loader.rs b/src/plugin/loader.rs index 1b58e1c0..bbd4ee4a 100644 --- a/src/plugin/loader.rs +++ b/src/plugin/loader.rs @@ -463,6 +463,7 @@ pub fn check_api_version(plugin_version: u32) -> Result<(), crate::plugin::api:: } Ok(()) } + } } #[cfg(test)] mod tests { @@ -522,6 +523,7 @@ mod version_tests { fn test_api_version_check() { let result = check_api_version(999); assert!(matches!(result, Err(PluginError::VersionMismatch { .. }))); + } #[test] fn test_loader_creation() { @@ -663,3 +665,6 @@ mod version_tests { ); let result_ok = check_api_version(PLUGIN_API_VERSION); assert!(result_ok.is_ok()); + } +} +}