From 7c035acc6e282cdbaa3b0060a528660fa0dba0d4 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 22 Nov 2026 18:58:26 +0100 Subject: 0.12.1: accept `command` as an alias for `cmd` in bash A field report showed ~40% of bash calls died on a one-word slip (command vs cmd); the alias removes the failure class instead of improving the error for it. --- src/tools/shell.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tools/shell.rs') diff --git a/src/tools/shell.rs b/src/tools/shell.rs index c38f032..c64bab3 100644 --- a/src/tools/shell.rs +++ b/src/tools/shell.rs @@ -37,7 +37,11 @@ pub fn bash( timeout: Duration, cancel: &AtomicBool, ) -> Result { - let cmd = match args.get("cmd").and_then(|v| v.as_str()) { + let cmd = match args + .get("cmd") + .or_else(|| args.get("command")) + .and_then(|v| v.as_str()) + { Some(cmd) => cmd.to_string(), None => return Err("missing required argument `cmd`".into()), }; -- cgit v1.2.3