From b43acac8eec338f6f65738df245c531311d02a0b Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Fri, 21 Aug 2026 11:51:23 -0600 Subject: [PATCH] fix: surface macro parse errors on top-level invocation An invalid installed macro invoked as a top-level command fell through to the generic unknown-command error, while .macro reported the parse/validation failure. Both paths now surface the reason. --- src/repl/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/repl/mod.rs b/src/repl/mod.rs index 9eb1b33..6f7bbf2 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -1337,6 +1337,9 @@ pub async fn run_repl_command( "Macro '{name}' is restricted by {} enabled_macros", ctx.macro_lock_owner(*level) ), + Some(MacroState::Invalid { reason }) => { + bail!("Macro '{name}' is invalid: {reason}") + } _ => unknown_command()?, } }