From a36a058a68d2b4624497bb91755e94a7d039c115 Mon Sep 17 00:00:00 2001 From: Devyn Cairns Date: Sat, 27 Jul 2024 04:53:44 -0700 Subject: [PATCH] Clean up arguments added to stack after `CallDecl` engine call --- crates/nu-plugin-engine/src/context.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/nu-plugin-engine/src/context.rs b/crates/nu-plugin-engine/src/context.rs index d9023cde35..160ce802b2 100644 --- a/crates/nu-plugin-engine/src/context.rs +++ b/crates/nu-plugin-engine/src/context.rs @@ -257,12 +257,9 @@ impl<'a> PluginExecutionContext for PluginExecutionCommandContext<'a> { } } - decl.run( - &self.engine_state, - stack, - &(&call_builder.finish()).into(), - input, - ) + call_builder.with(stack, |stack, call| { + decl.run(&self.engine_state, stack, call, input) + }) } fn boxed(&self) -> Box {