From c854041bfca63f39ace6f0c01892e81889f90bb3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 14:24:48 +0900 Subject: fix(global-command): call base_run to stop run() infinite recursion GlobalCommand::run fell back to self.run when given fewer than two args, recursing forever and overflowing the stack. PHP calls parent::run there. Add Command::base_run holding the base run body so the override can delegate to it, matching PHP's parent::run. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/command/global_command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src') diff --git a/crates/shirabe/src/command/global_command.rs b/crates/shirabe/src/command/global_command.rs index 941315b..0645b3a 100644 --- a/crates/shirabe/src/command/global_command.rs +++ b/crates/shirabe/src/command/global_command.rs @@ -180,7 +180,7 @@ impl Command for GlobalCommand { } if args.len() < 2 { - return self.run(input, output); + return self.base_run(input, output); } let sub_input = self.prepare_subcommand_input(input, false)?; -- cgit v1.3.1